vlookup cased on dropdown

rooster05

New Member
Joined
Mar 4, 2017
Messages
34
i have a dropdown in A1 which is 2 companies, i have data for these companies on 2 separate worksheets. what i would like is, if A1 =company 1 i could have a vlookup for that sheet in tabs A4:D4, but if A1 = company 2 a vlookup to that sheet would be needed for the same range.

i have looked at videos and read examples but nothing seems to be clear, any help and advice would be greatly appreciated
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
i have a dropdown in A1 which is 2 companies, i have data for these companies on 2 separate worksheets. what i would like is, if A1 =company 1 i could have a vlookup for that sheet in tabs A4:D4, but if A1 = company 2 a vlookup to that sheet would be needed for the same range.

i have looked at videos and read examples but nothing seems to be clear, any help and advice would be greatly appreciated

=if(A1="ABC";vlookup(lookupvalue;Sheet1!A4:D4;0);vlookup(lookupvalue;Sheet2!A4:D4;0))

Substitute "ABC" by the name of the company you have on the dropdown and "lookupvalue" by the value you want to look up for on sheets 1 and 2. That should do the trick.

Cheers,
ORoxo
 
Upvote 0

Forum statistics

Threads
1,215,139
Messages
6,123,263
Members
449,093
Latest member
Vincent Khandagale

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