Multiple IF Statements

sstorm

Board Regular
Joined
Nov 5, 2003
Messages
76
This is my formula:

=IF($B2="Missouri-Kentucky",VLOOKUP($D2,'Lookup Table'!$N$2:$O$1001,2,FALSE),IF(B2="Georgia",VLOOKUP(D2,'Lookup Table'!$E$2:$F$101,2,FALSE),IF(B2="MidAtlantic/West",VLOOKUP($D2,'Lookup Table'!$K$2:$L$31,2,FALSE),IF($B2="Illinois-Indiana",VLOOKUP($D2,'Lookup Table'!$H$2:$I$9,2,FALSE),IF($B2="Florida",VLOOKUP($D2,'Lookup Table'!$B$2:$C$134,2,FALSE))))))

This formula works for part of what I want. It is returning the values that I am looking for...if they are there. If they aren't there, it is returning NA. I usually use the IF(ISNA( function, but I can't figure out how to get it to work with this multiple IF statement. If the result is NA for Missouri-Kentucky, Georgia, MidAtlantic/West and Illinois-Indiana I want it to say "INHOUSE". If it is NA for Florida, I want it to say "CONTRACTOR". Can someone help???

Thanks!

Stacy
 
How about having either...

1]

=IF(ISNA(MATCH($D2,INDEX('Lookup Table'!B:O,0,VLOOKUP($B2,AreaTable,2,1)),0)),VLOOKUP($B2,AreaTable,3,1),INDEX('Lookup Table'!B:O,MATCH($D2,INDEX('Lookup Table'!B:O,0,VLOOKUP($B2,AreaTable,2,1)),0),VLOOKUP($B2,AreaTable,2,1)+1))

or, if you have the morefunc add-in...

2]

=IF(ISNA(SETV(MATCH($D2,INDEX('Lookup Table'!B:O,0,VLOOKUP($B2,AreaTable,2,1)),0))),VLOOKUP($B2,AreaTable,3,1),INDEX('Lookup Table'!B:O,GETV(),VLOOKUP($B2,AreaTable,2,1)+1))

which exploits the lay-out of your data on sheet Lookup Table?

AreaTable is a range on a separate sheet called Admin...
Book10
ABCD
1Area Table
2AreaCol in LTType
3Florida1CONTRACTOR
4Georgia4INHOUSE
5Illinois-Indiana7INHOUSE
6MidAtlantic/West11INHOUSE
7Missouri-Kentucky13INHOUSE
8
Admin


AreaTable associates geographic areas to column numbers on Lookup Table. BTW, why not shorten the name Lookup Table to just LT?
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,216,166
Messages
6,129,257
Members
449,497
Latest member
The Wamp

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