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!
CodePudding user response:
Solution
Paste this formula in the first cell next to your numbers or take a look at the
Explanation
We check the above cell
ISNUMBER
if so we calculateC2 D1
if not we put0
IF(C2="",,
to calculate onlt when the rangeC2:C
is not Empty.CodePudding user response:
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),))