Sum of cell above and cell to the left - google-sheets

Don't know if it's the right place, but please help me if possible.
Google Sheets. I need a formula for the sum of value in cell directly above and cell directly to the left. I've tried something like this, but it doesn't work:
=SUM(INDIRECT(ADDRESS(ROW()-1,COLUMN()), ADDRESS(ROW(),COLUMN()-1)))

Try OFFSET: e.g. for cell B2:
=OFFSET(B2,-1,0)+OFFSET(B2,0,-1)
N.B. it fails if the values in those cells are not numeric.

Related

SUMIF sum value in next column over

I'm trying to make use of the SUMIF function in Google sheets to sum up points if a cell below it is set to "Excused" However, the condition cell (what will be "Excused") and the points cell, are not in the same column.
The basic SUMIF formula I'm starting with is below
=SUMIF($B$9:$CW$9,$B12:$CW12,"=Excused")
I've tried to illustrate this below. Using ranges that go horizontally across the sheet in rows 9 and 12. If the red cell is set to "Excused", it should sum the blue cell.
With how the formula is, it tries to sum the cell in row 9 but in the same column as the cell with "Excused" in it. But, for example, if B12 has "Excused" in it, I want it to sum C9.
Hopefully, this makes sense. I've done my best to explain it, please ask for clarification if needed.
try:
=SUM(IFNA(FILTER(C9:CX9; B12:CW12="Excused")))

How to reference an adjacent cell in google sheets relative to the selected cell

I am trying to use the =sum() function in google sheets, and so far, that's all I have typed into the targeted cell. For example, I want D3 to be the sum of C2 and D2. I know how to type that. =sum(C2,D2). But I want cells D3 thru D30 to have the same equation, relative to their adjacent cells. Something like this =sum(cell to the left, cell above). Let me know if you need more elaboration, or if you have the answer, great!
Solution
Paste this formula in the first cell next to your numbers or take a look at the Example Sheet
=IF(C2="",,IF(ISNUMBER(D1),C2+D1,0))
Explanation
We check the above cell ISNUMBER if so we calculate C2+D1 if not we put 0
IF(C2="",, to calculate onlt when the range C2:C is not Empty.
If you are looking for a single formula you can also try
=INDEX(IF(ISNUMBER(C2:C), SUMIF(ROW(C2:C),"<="&ROW(C2:C),C2:C),))

How to sum 3 cells only if one of both are not blank otherwise leave blank the cell in Google Sheets

I'm looking for a way to make sum only if one of both cells are not blank otherwise leave the sum cell blank. I'm working w/ Google Sheets.
Here is my formula for the moment: =SUM(L6;+K7;-J7) the same formula will be on 90 cells on the same column.
If anyone could help!
Sincerely!
You can you use the combination of IF() and AND() methods in google sheet :
=if(and(ISBLANK(A2),ISBLANK(B2)),"",SUM(A2:C2))

Filter() formula is stopping conditonal format from working

I have a filter() formula in cell A1 which I want to be red if the cell is empty.
The problem is the cell is always populated because of the formula in the cell. Is there anyway round this?
The conditional formatting rule format cells if... is empty will highlight a cell when it is truly blank or only contains whitespace. It does not make a difference whether the cell contains a hand-entered value or a formula.
When a filter() formula gets zero results, the formula cell will display an #N/A error. Error cells are not considered empty. To make the formula cell truly empty in the event of zero results, and let your conditional formatting rule work the way you want, use the iferror(filter()) pattern.

Google sheets conditional formatting depending on other cell

I'm trying to make every cell in range A2:G21 green if its value is lower than A24. I thought It would be quite easy but I just can't figure it out.
Thanks in advance!
Select from A2 to G21 and apply a Custom formula is of
=A2<$A$24

Resources