IF statement quick help.

Ryan1996

Board Regular
Joined
Jun 4, 2018
Messages
55
I have the below formula

=IF(AND(OR(H2="#N/A",I2="#N/A", J2="#N/A")),"FAIL","PASS")

In the results it either brings "PASS" when passed or shows "#N/A" when failed.

How can i get this to say PASS when it's passed and FAIL when it's Failed?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Do you want it to say fail when any of them display #N/A?

For example what if there is:

1 #N/A?
2 #N/A?

in these cells
 
Upvote 0
Also your way can work as well but you didnt need the AND function and you can use ISNA instead of ="#N/A":

For example:

=IF(OR(ISNA(H2),ISNA(I2), ISNA(J2)),"FAIL","PASS")
 
Last edited:
Upvote 0
Wonderful, first worked like a charm. Great to know about the ISNA too, i knew it woulda worked somehow just couldn't figure it out. Thanks for the info!!
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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