IF OR formula

audrey

Active Member
Joined
Jul 30, 2008
Messages
491
Hello,

I am trying to make a simple IF OR formula, but for some reason it doesnt seem to work....

=IF(OR(N60="N/A", M60="N/A", N60-M60<0,"",N60-M60)


so basically in those 3 cases I want the formula to leave a blank, if non of those cases are realized I want the formula to perfom a basic substraction.

I think I can also use IF(ISNUMBER formula??? If n60 or M60 is not an actual number leave blank or perfom a basic substraction.....


Thanks!
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
hello JB Scotland I still get <table border="0" cellpadding="0" cellspacing="0" width="107"><col width="107"><tr height="20"> <td class="xl99" style="height: 15pt; width: 80pt;" width="107" height="20">#VALUE!</td> </tr></table>
 
Upvote 0
=IF(ISNUMBER(M60-N60),IF(M60-N60<0,"",M60-N60),"")

Should work for both "N/A" text and #N/A returned from a function.
 
Upvote 0
Great.

The problem with your original formula was that part of your OR function the N60-M60<0 was calculating to #VALUE when it encountered a TEXT value in either N60 or M60. If you have cells that may be text or number you need to check if they are numbers with the ISNUMBER() function before using them in a mathematical function otherwise you will get the error.
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,134
Members
452,890
Latest member
Nikhil Ramesh

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