IF statement checking 4 conditions...HOW?

AdRock

Board Regular
Joined
Apr 1, 2011
Messages
128
I need to do an IF statement or something similar that can check for 4 condition if they all fail, display an error message

In cell A1 there is a list with values "1 Day" and "3 Day"

In cell A2 there is a list with values "Large" and "Small"

What i would like to check is these conditions:

A1 = 1 Day, A2 = Large
A1 = 1 Day, A2 = Small
A1 = 3 Day, A2 = Large
A1 = 3 Day, A2 = Small

I have a 2D lookups which will give me the value i want based on those conditions, i just need to know how to do an IF or whatever which will let me check all those condtions.

Any help appreciated
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Check out AND and OR statements

IF(OR(AND(A1="1 Day",A2="Large"),AND(A1="1 Day",A2="Small"),AND(A1="3 Day",A2="Small"),AND(A1="3 Day",A2="Large")),"Do something Positive", "else something Negative")
 
Upvote 0
That makes sense but how would i apply a VLOOKUP for each condition?

I have 4 lookups each referencing either a different worksheet or different part of the worksheet.
 
Upvote 0
Thats different

IF(AND(A1="1 Day",A2="Large"),VLOOKUP(yourkey,thatRange...),IF(AND(A1="1 Day",A2="Small"),VLOOKUP(yourkey,anotherRange...),...... etc

remember to close off with four brackets to close the IF statements

or

VLOOKUP(IF(AND(A1="1 Day",A2="Large"),yourkey,IF(AND(A1="1 Day",A2="Small"),yourkey....
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,289
Members
452,902
Latest member
Knuddeluff

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