# Thread: IF statement Thanks:  4 Post #5326517 (1)Post #5326595 (1)Post #5326599 (1)Post #5326611 (1) Likes:  2 Post #5326599 (1)Post #5326611 (1)

1. ## Re: Need help with IF statement

Toadstool, one more question. When there is NO data in columns E & F, the formula returns FALSE which is not a big deal but I would like it better if it just showed a 0 (zero). To that end, I added IFERROR to the formula (see below) but am still getting the FALSE. Is it possible to have it return a 0 until someone actually uses the worksheet?

Code:
`=IFERROR(IF(E204:E225<>"",SUM(E204:E225-OFFSET(E204:E225,-1,1))+MAX(F204:F225)),0)`

2. ## Re: Need help with IF statement

Forgot to mention that yes, I did enter the formula as an array formula, using the CTRL+SHIFT+ENTER.

Code:
`{=IFERROR(IF(E204:E225<>"",SUM(E204:E225-OFFSET(E204:E225,-1,1))+MAX(F204:F225)),0)}`

3. ## Re: Need help with IF statement

I didn't ELSE the IF statement, which you don't actually need, so:
{=SUM(E204:E226-OFFSET(E204:E226,-1,1))+MAX(F204:F226)}

4. ## Re: Need help with IF statement

Perfect! Thank you so much!

Cheers!