Multiple Logic Test syntax

julhs

Active Member
Joined
Dec 3, 2018
Messages
471
Office Version
  1. 2010
Platform
  1. Windows
Need some help as my knowledge is limited and I’m struggling with syntax of my formula?

This is what I have so far,

Formula in K18:

Code:
=IF(K16=0,"Select nozzle colour",IF(K17=0,"Select # passes",[COLOR="#FF0000"]IF(AND(OR(K16="Red",K16="Blue"),"Select correct nozzle","xxx"),[/COLOR]IF(AND(K16="Red",K17>0),50,IF(AND(K16="Blue",K17>0),37,"CHECK NOZZLE ENTRY")))))
Want the formula in K18 to pick up if an incorrect entry has been made in K16, only correct entries in K16 can be “Red” or “Blue”.
K16 & K17 are input cells.

But as it stands my formula is giving a # value error in K18, but that’s due to the incorrectly constructed part “IF(AND(OR”

I could use a drop down to select only Red & Blue but for now want to do it with formula if possible.

Any help greatly appreciated
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
How about
=IF(K17<=0,"Select # passes",IF(NOT(OR(K16={"red","Blue"})),"Select nozzle colour",IF(K16="Red",50,37)))
 
Upvote 0
Thanks.
Yours is more compact but outcome is the same as this earlier version of mine.

Code:
=IF(K16=0,"Select nozzle colour",IF(K17=0,"Select # passes",IF(AND(K16="Red",K17>0),50,IF(AND(K16="Blue",K17>0),37,"Check nozzle entry"))))
Want K18 to initially display "Select nozzle colour", then when “Red” or “Blue” is entered in K16 for K18 to display "Select # passes".
But if anything other than “Red” or “Blue” is entered in K16 then K18 should display "Check nozzle entry" immediately, so BEFORE any entry is made into K17.

But in both yours and my version (added above) "Check nozzle entry" is only displayed in K18 AFTER entries have been made in both K16 & K17
Code:
 
Upvote 0
It would have helped if you had said that in your OP!!
I am not a mind reader ;)
 
Upvote 0
Try
=IF(K16="","Select nozzle colour",IF((NOT(OR(K16={"red","Blue"}))),"Check nozzle entry",IF(K17<=0,"Select # passes",IF(K16="Red",50,37))))
 
Upvote 0
Solution
My apologies for the lack of clarity!!

Thank you for your help, your solution is giving me the outcomes exactly as I wanted.

Many thanks

P.S
Metaphorically speaking you could have written solution on paper and thrown it to me as I’m only on other side of the county
 
Upvote 0
You're welcome & thanks for the feedback.

Unfortunately my paper planes don't even make it to the other side of room, let alone the county:)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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