Or Statement

techstyle20

New Member
Joined
May 14, 2012
Messages
40
Hi,

I need to add an additional argument to the following:

=(IF(AND(D12=0,E12<>0),(-100%+I7),((D12-E12)/D12)-I7))

This works fine until there is a "0" (zero) in both D12 & E12 as it is dividing itself by zero and I get the #DIV/0! error.

I need this to input "-" if both D12 & E12 contain "0" (zero)

Thanks in advance!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
I don't think you have to worry about E12 being 0... the error is raised only when D12 is 0. Give this a try...

=(IF(AND(D12=0,E12<>0),(-100%+I7),IF(D12=0,"-",((D12-E12)/D12)-I7)))
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,334
Members
452,636
Latest member
laura12345

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