Vlookup across multiple sheets based on cell value

dan4

New Member
Joined
Nov 23, 2010
Messages
39
Hello, can someone please advise a formula to use vlookup based on a cell value and different sheets. For example, I have three worksheets in one excel file:
Worksheet A = Master
Worksheet B = MFG
Worksheet C = Buy

Question:
If Cell C4 in master worksheet = "ZFIN", Vlookup value from master worksheet A1 in worksheet "MFG" as the table array, and return col_index_num 5 from the MFG worksheet. However, if Cell C4 in master worksheet = "BUY", Vlookup value from master worksheet A1 in worksheet "BUY" as the table array, and return col_index_num 5 from the BUY worksheet.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
You should be able to do something structured like this:
Rich (BB code):
=IF(C4="ZFIN",VLOOKUP(...),IF(C4="BUY",VLOOKUP(...),""))
when the blue VLOOKUP is your VLOOKUP formula to the "MFG" sheet, and the red VLOOKUP is your VLOOKUP formula to the "BUY" sheet
 
Upvote 0
=if( master!C4="ZFIN", Vlookup(master!A1,MFG!Table range,5,false), IF( master!C4="BUY", Vlookup(master!A1,BUY!Table range,5,false)))
is that what you mean
i'm not following
in worksheet "BUY" as the table array,
has the BUY sheet got a name range also called BUY ?
 
Upvote 0

Forum statistics

Threads
1,226,017
Messages
6,188,441
Members
453,474
Latest member
th9r

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