Multiple VLOOKUP Nested with AND Statement

anbarblue

New Member
Joined
Jun 5, 2012
Messages
8
Hi All!

I've been working on this all day! <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
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:p></o:p>
<o:p></o:p>
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:p></o:p>
<o:p></o:p>
1.=IF(AA1303="",VLOOKUP(T1303,'MB'!F:G,2,0),AA1303)<o:p></o:p>
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

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
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.
 
Upvote 0
Hi All!

I've been working on this all day! <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
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:p></o:p>
<o:p></o:p>
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:p></o:p>
<o:p></o:p>
1.=IF(AA1303="",VLOOKUP(T1303,'MB'!F:G,2,0),AA1303)<o:p></o:p>
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?
 
Upvote 0
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)))))))]
 
Upvote 0
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!! :)
 
Upvote 0
What else can V be? In other words: When do you want to return X ?
 
Upvote 0
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!
 
Upvote 0
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!
 
Upvote 0

Forum statistics

Threads
1,215,794
Messages
6,126,944
Members
449,349
Latest member
Omer Lutfu Neziroglu

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