Cell A1 can be either 50, 75, 100 Cell A2 can be either 50A, 50B, 75A, 75B, 100A, 100B Cell A3 is to return the result of: If Cell A1 is 50 and Cell A2 is either 50A or 50B, then message "OK", If Cell A1 is 75 and Cell A2 is either 75A or 75B, then message "OK", If Cell A1 is 100 and Cell A2 is either 100A or 100B then message "OK", otherwise "Thickness must match"
I can get this to work if I only use the one set of items, ie. 50, 50A and 50B but once I introduce the 75 and 100 it falls down
Reply from Richard Rost:
You have to use your IF, AND, and OR functions properly. It's easier if you break it down into multiple columns. For example, in B1, I would put the following:
=AND(A1=50,OR(A2="50A",A2="50B"))
That checks for the first value. Now do the same thing for the other two values in C1, and D1. Now you will have three TRUE or FALSE values. In E1, you can say:
=IF(AND(B1,C1,D1),"OK","Thickness must match")
And there you go. It would be a big mess to put that all together into one formula. You COULD do it, but this is much easier to read.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Excel Forum.