calculating a value if adjacent cell has value

  • Thread starter Thread starter Matt Stayton
  • Start date Start date
M

Matt Stayton

I am trying to get a cell to perform a certain calculation if another cell
has a value placed in it larger than "0".

Column A Column B Column C
Row 1 Start End Total
Row 2 0 18 18
Row 3

I want cell A3 to calculate B2+1 only if B3 has a value larger than 0.
Otherwise I want the A3 to remain blank if nothing is entered in B3.

Thanks!
 
That worked perfectly, but now my total in column C reads #VALUE!.

In Column C I am having it subtract Column A from Column B example =B4-A4.

Then I also have a total at the bottom C8 with the formula =SUM(C2:C7). This
also gives me the answer #VALUE!

Column A Column B Column C
Row 1 Start End Total
Row 2 0 18 18
Row 3 19 198 179
Row 4 #VALUE!
Row 5 #VALUE!
Row 6 #VALUE!
Row 7 #VALUE!
Row 8 TOTAL #VALUE!

Thanks for your help!
 
Math operators (+, -, *, /, etc) will return the #VALUE! error if one of
the arguments is text (including the null string, "")

One option:

C2: =IF(COUNT(A2:B2)=2,B2-A2,"")

The #VALUE! returned in C8 is due the the #VALUE! errors in C2:C7. SUM()
ignores text.
 
Back
Top