IF(AND function with Blanks

perkinsr1

New Member
Joined
Apr 24, 2016
Messages
17
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi,

Hope you can help me? I am using the below string and it is giving me most of the answer, however I want it to be blank if either R13 or S13 are blank.

=IF(AND(R13="Below",S13="Below"),"PASS",IF(AND(R13="Emerging",S13="Emerging"),"PASS",IF(AND(R13="Effective",S13="Effective"),"PASS",IF(AND(R13="Expert",S13="Expert"),"PASS","FAIL"))))


Thanks in advance

Rob
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Ostensibly:

Code:
=IF(OR(R13="",S13=""), "",
IF(AND(R13="Below",S13="Below"),"PASS",IF(AND(R13="Emerging",S13="Emerging"),"PASS",
IF(AND(R13="Effective",S13="Effective"),"PASS",IF(AND(R13="Expert",S13="Expert"),"PASS","FAIL")))))

But I wonder if one of the following works for you:

Code:
=IF(OR(R13="",S13=""), "", IF(R13=S13, "PASS", "FAIL"))

or

=IF(OR(R13="",S13=""), "", IF(AND(R13=S13, OR(R13={"Below","Emerging","Effective","Expert"})), "PASS", "FAIL"))

Use the latter only if R13 (and S13) might have some other value that you do not want to allow.
 
Last edited:
Upvote 0
Ostensibly:

Code:
=IF(OR(R13="",S13=""), "",
IF(AND(R13="Below",S13="Below"),"PASS",IF(AND(R13="Emerging",S13="Emerging"),"PASS",
IF(AND(R13="Effective",S13="Effective"),"PASS",IF(AND(R13="Expert",S13="Expert"),"PASS","FAIL")))))

But I wonder if one of the following works for you:

Code:
=IF(OR(R13="",S13=""), "", IF(R13=S13, "PASS", "FAIL"))

or

=IF(OR(R13="",S13=""), "", IF(AND(R13=S13, OR(R13={"Below","Emerging","Effective","Expert"})), "PASS", "FAIL"))

Use the latter only if R13 (and S13) might have some other value that you do not want to allow.



Hi Joeu2004, the first one work perfect, thank you!!!
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

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