Formula disappearing when I exit the Google Sheets app? - google-sheets

I have a value in G3 and a value in H3. In I3 I have the following formula:
=ARRAYFORMULA(G2:G&"."&H2:H)
(Note that the formula and the problem below is in multiple rows below)
to show the values in G3 and H3 together as a decimalised value. I used the array formula as I needed a way to insert new rows and maintain the formula in the I column as I want new information to be at the top. All was working fine but I've entered the spreadsheet this morning to find the correct values in the I column but without the formula there (except in row 2 which is blank and used as a divider between headers and info).
Any ideas as to why this has happened, please?

Related

Google Sheets formula to be applied in rows where there is only numbers

I have a Google Sheets workbook, have lot of data in it in the following way as shown in the picture:
So What I want to do is to highlight all rows in which LDCP > Current (Displayed in green), that is fine when I use conditional formatting and add a formula. But since there are 1000s of such rows, what I want to do is to select all and apply that formula however when I do that it highlights the rows with text such as Leasing Companies and Leather & Tanneries.
Is there a way that I can select the whole sheet and apply a formula which only is applicable where the B column (LDCP) and F Column (Current) consists of numbers. This way only those rows will be highlighted and not the other ones.
Any other kind of advice to do this would be appreciated as well.
Regards,
~K
Try this in your conditional formatting custom formula:
=and($B1>$F1,isnumber($B1))
Range A1:Fnnn where nnn is the end of your sheet.

Add formula to entire row of google sheets

I am using a google sheet as a database. When a row is populated (using JSON API and Integromat), I want formulas in the newly added row to update. However, I cannot get the formula to be applied to the whole column automatically.
For instance, C1 is =A1+B1. When A2 and B2 are added, C2 should be =A2+B2.
I have tried:
Double clicking the box in the bottom right corner of the selected cell. This does not work because it adds the formula for all rows that contain data. When a new row is added, the formula is not applied to that row.
Using the formula with a range =A1:A+B1:B. This formula is only applied to the selected cell.
Pasting the formula in the column header. This simply did not work. Even when I tried to include a formula that used a range =A1:A+B1:B.
Using hotkeys like shift + ctrl + Down + D. I was unable to find any that worked. Most were for windows computers (I am using a mac).
I'm sure I'm just making a stupid error, but I haven't been able to find any solutions.
Thanks in advance!
Place this in the header row (assuming the header row and you want to add all other rows).
={"YOUR HEADER";ARRAYFORMULA(A2:A+B2:B)}

Freeze formula that references cell in another sheet

I'm working in a Google Sheets document that has two sheets, Sheet1 and Sheet2. Sheet2 has a cell, A3, with the formula =Sheet1!A3. This pattern holds throughout the column – e.g. A4 in Sheet2 has formula =Sheet1!A4, etc. Without getting into too much detail of the why, essentially the A column in Sheet1 is to be reflected in the A column of Sheet2. My desire is that when Sheet1 is updated, those changes will be reflected in Sheet2.
The problem is that when I add/delete entries into/from column A in Sheet1, Google Sheets automatically updates the formulas in Sheet2 in a way I don't want it to. For example, say I insert a cell above A3 in Sheet1, so that there is now new information in A3 and the previous A3 is now shifted down to A4. When I check out Sheet2 I want the new A3 from Sheet1 to be reflected in Sheet2's A3. However, the formula in Sheet2's A3 cell has now been updated to =Sheet1!A4 (so that Sheet2's A3 still shows the information from Sheet1's original A3), and all subsequent cells have been shifted by one as well. I can see a reason for this auto-updating functionality, but it is a hinderance in this case.
In looking up a solution, I've found out about absolute reference, i.e. changing the formula in A3 to =Sheet1!$A$3, but this unfortunately does not help in my case.
Is there any way to prevent this autoupdating of the cell reference?
On Sheet2 use INDIRECT. Example
Add the following formula to Sheet2!A1
=INDIRECT("Sheet1!A:A")
The above will not be "affected" by row/column changes made into Sheet1 because it doesn't make a direct reference to rows/columns on Sheet1.
Non-volatile equivalent of INDIRECT could be INDEX.
=index(Sheet1!a:a, 3)
Unfortunately, filling down for index(Sheet1!a:a, 4), etc is difficult if not impossible. You could represent the 3 with a row reference to a worksheet that will never have rows deleted; e.g. row(sheet2!b3). That shouldn't change unless you add/delete rows on sheet2 while allowing add/delete rows on sheet1.

How to apply a formula to cells in a given range?

I have a sheet that is the result of a query and can return an arbitrary number of result rows (the number of columns is fixed).
I am calculating the range that corresponds to the result set. This is working well. I use it to copy the result set into my sheet.
Now that I have the results copied to my sheet I want to add a column with a formula that works against the cells in the row. How to do this? The issue is that the number of rows is not fixed, how to have the formula apply to the rows that happen to be there.
Here is a sample sheet:
Result Set is the output of the query
Report is the sheet I made with a copy of the result set
Link to Sheet
Column C is what I am trying to populate, the number of rows for Columns A and B will update each time I open the sheet.
Another way:
=arrayformula(if(A13:A<>"",A13:A&"="&B13:B,""))

How do I organize formulas to work with columns in google sheets

Hi so I'm trying to make a spreadsheet in Google Sheets that takes two numbers and subtracts them and then does it in the next row .
So example the formula in C1 would be "subtract(A1, B1)" in the first row. But then in the next row I would like it to change to "subtract(A2, B2)" and output in C2.
(Without having to go in each C cell and change the formula of course)
So how do I do that and also how do I apply a formula to multiple cells of a row (C1,C2,C3,C4,C5, etc....)
Just put =MINUS(A1,B1) into C1 and then copy it and paste it in the remain rows of column C and the spreadsheet automatically adjusts the row numbers for you.
#Cooper's Answer above is perfect. I'm just giving a alternative here using array formulas, because it's easy.
Put this in D2
=ARRAYFORMULA(MINUS ( B2:B, MULTIPLY( 2.5, QUOTIENT(C2:C,15))))

Resources