IF statement with AND/OR to avoid #DIV/0!

dkdmre

New Member
Joined
May 22, 2003
Messages
29
I use a standard IF statement that if the denominator in a fomula is 0 then return N/A on some reports I do for % variances to budget. However I have found that when both the numerator and denominator is zero my formula returns the #DIV/0! and cosmetically I want to have N/A. I am not sure why this is, but I need a formula that says if both A1 and B1 are zero or if the denominator is zero then return N/A otherwised do the division. I understand IF statements it is the multiple conditions that I am unsure of. Thanks
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

dkdmre

New Member
Joined
May 22, 2003
Messages
29
I want to add one more bit of info. I am retrieving these numbers through an OLAP tool that is an excel add in so I think it does not recognize the zero as a true zero. If I open a blank workbook and use my standard IF statement if works. Prehaps I need some kind of text formula?
 

Forum statistics

Threads
1,147,676
Messages
5,742,555
Members
423,737
Latest member
tom_xls

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
Top