# Multiple VLOOKUP Nested with AND Statement

#### anbarblue

##### New Member
Hi All!

I've been working on this all day! <?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
I am able to get the following two formulas to work independently, but not together… I know I’m missing something, but I cannot figure out what. <o></o>
<o></o>
Here is my pseudocode: If (x= blank, do a vlookup on sheet1, otherwise return x) but if v = “a”, “b”, “c”, “d”, then do a vlookup on sheet2 instead) <o></o>
<o></o>
1.=IF(AA1303="",VLOOKUP(T1303,'MB'!F:G,2,0),AA1303)<o></o>
2.=(VLOOKUP(V1303,'Eastern&Western.Overlap'!A:B,IF(R1303="MINC",2,IF(R1303="RAYASS",2,IF(R1303="RAYJAMES",2,IF(R1303="CAPMKTS",2,IF(R1303="ML",2,FALSE)))))))

Thanks!!!

### Excel Facts

To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Are there other possible values besides a,b,c,d and blank? If not, you could do the if (a ...,b ...,c ...,d ...) like you're doing and use an else statement for the blank to lookup on sheet 1.

What if X is blank and V is "a"?

Hi All!

I've been working on this all day! <?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
I am able to get the following two formulas to work independently, but not together… I know I’m missing something, but I cannot figure out what. <o></o>
<o></o>
Here is my pseudocode: If (x= blank, do a vlookup on sheet1, otherwise return x) but if v = “a”, “b”, “c”, “d”, then do a vlookup on sheet2 instead) <o></o>
<o></o>
1.=IF(AA1303="",VLOOKUP(T1303,'MB'!F:G,2,0),AA1303)<o></o>
2.=(VLOOKUP(V1303,'Eastern&Western.Overlap'!A:B,IF(R1303="MINC",2,IF(R1303="RAYASS",2,IF(R1303="RAYJAMES",2,IF(R1303="CAPMKTS",2,IF(R1303="ML",2,FALSE)))))))

Thanks!!!
Why do you have all of those IF functions in formula #2? They all return 2 (column_index_number).

Is that red highlighted section supposed to mean:

if v = A or B or C or D?

Good Question Ben!!

What if X is blank and V is "a"? Then I want to do the vlookup in #1;[VLOOKUP(T1303,'MB'!F:G,2,0) ] if that doesn't return a value then I want to do my #2. [=(VLOOKUP(V1303,'Eastern&Western.Overlap'!A:B,IF(R1303="MINC",2,IF(R1303="RAYASS",2,IF(R1303="RAYJAMES",2,IF(R1303="CAPMKTS",2,IF(R1303="ML",2,FALSE)))))))]

Ok T-

I have no clue why it's red... not on purpose..

I have all the IF functions, because I couldn't figure out how to minimize it using the column_index_number. please advise! The formula would be super!!

What else can V be? In other words: When do you want to return X ?

Ok T-

I have no clue why it's red... not on purpose..

I have all the IF functions, because I couldn't figure out how to minimize it using the column_index_number. please advise! The formula would be super!!
Ok, I'm just going to move on.

I see Ben is actively engaged with you and if I start asking all kinds of questions it'll just get confusing trying to respond to both of us.

Good luck!

Ok, I'm just going to move on.

I see Ben is actively engaged with you and if I start asking all kinds of questions it'll just get confusing trying to respond to both of us.

Good luck!

Yes, I did giggle at that red thingy I'll try to make some sense of this .. never seen anyone use an IF statement for the column index number!

What if X is blank and V is "a"?

Thanks Ben...didn't read the original formula properly.

Replies
4
Views
5K
Replies
2
Views
307
Replies
2
Views
2K
Replies
7
Views
2K
Replies
11
Views
1K

### Forum statistics

1,203,490
Messages
6,055,725
Members
444,814
Latest member
AutomateDifficulty

### 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.

### Which adblocker are you using?

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

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