Sum If = 0 but this ruins graph

Plumbstar Tom

Board Regular
Joined
May 26, 2010
Messages
69
Hi I have this formula in use

=SUMIF($D$22:$D$222,"=Sales",H22:H222)

But if the result is 0 then on my dynamic chart it upsets the chart as it results in an answer of zero meaning the chart has a value to work on

Is there any way I can do SUMIF but if the result is 0 then do not do SUMIF calculation so to speak?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Try

=IF(SUMIF($D$22:$D$222,"Sales",H22:H222)=0,NA(),SUMIF($D$22:$D$222,"Sales",H22:H222))
 
Upvote 0
You can wrap your original formula in another IF statement, which if value = 0 then result is #N/A, e.g.

=if(SUMIF($D$22:$D$222,"=Sales",H22:H222)<>0,SUMIF($D$22:$D$222,"=Sales",H22:H222),#N/A)

HTH
 
Upvote 0

Forum statistics

Threads
1,224,509
Messages
6,179,192
Members
452,893
Latest member
denay

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