Nested IF Statement Formula Works, if conditions aren't met I get a #VALUE! instead of 0/Blank

c.clavin

Board Regular
Joined
Mar 22, 2011
Messages
123
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hi guys, I've been trying to refigure this for a while but can't seem to get it. The formula works when the cells referenced have data in them, but when its blank, I get a #VALUE! result which is affecting the rest of my calculation down the column. Can you help? Basically adding up to 3 numbers, out of 4 total statements. Thanks :)

=SUM(IF(H21="","",VLOOKUP(H21,FRUITS,2,FALSE)),IF(AND(ISNUMBER(SEARCH("Apple",H17)),ISNUMBER(SEARCH("Orange",H21))),J32,0),IF(AND(H17="",ISNUMBER(SEARCH("Orange",H21))),K32,0),IF(AND(H17="",I21="Delivery"),93,0))
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Should I have started it with a blank/non blank if statement? Like =IF(H21="","",SUM... ?
 
Upvote 0
Hi,

Don't know anything about your data, but may be you can just wrap your formula with IFERROR, like:

=IFERROR(your formula,"")
 
Upvote 0
Hi,

Don't know anything about your data, but may be you can just wrap your formula with IFERROR, like:

=IFERROR(your formula,"")
I'm having this same issue. I attempted your solution and it did indeed get rid of the error. But the other issue I'm having is that I'm charting this data. So the chart is still plotting 0's and displaying them in the line graph.
 
Upvote 0

Forum statistics

Threads
1,215,491
Messages
6,125,098
Members
449,205
Latest member
ralemanygarcia

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top