VLookup

boggis2000

New Member
Joined
Feb 2, 2004
Messages
3
Hi everyone, another newbie and my first post!

I am still fairly new to Excel but not stupid, and have a small problem. The problem arises when using the function VLookup and the formula is:

=VLOOKUP(B10,dA!A4:J4,4,FALSE)

The function looks up values in an array from another sheet called dA. I want to be able to select different sheets where the values are looked up from, so it is not always dA. (I want dB, dC etc...)

I have created a validation cell which contains a list of the sheets' names but can't incoporate it into the formula. It would be good if I could select the sheet from the list in the cell (ie dA, dB) and then the value in the cell is used in the function.

Also, can I automatically have sheet names listed in the validation cell instead of typing them in manually?

Please fell free to ask questions as I'm finding it a problem decribing the situation!!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
boggis2000 said:
Hi everyone, another newbie and my first post!

I am still fairly new to Excel but not stupid, and have a small problem. The problem arises when using the function VLookup and the formula is:

=VLOOKUP(B10,dA!A4:J4,4,FALSE)

The function looks up values in an array from another sheet called dA. I want to be able to select different sheets where the values are looked up from, so it is not always dA. (I want dB, dC etc...)

I have created a validation cell which contains a list of the sheets' names but can't incoporate it into the formula. It would be good if I could select the sheet from the list in the cell (ie dA, dB) and then the value in the cell is used in the function.

Also, can I automatically have sheet names listed in the validation cell instead of typing them in manually?

Please fell free to ask questions as I'm finding it a problem decribing the situation!!

Welcome to the baord. To take your last point, I'm not sure what you mean by listed automatically, other than a validation drop-down box which it sounds like you already have.

You can incorporate an INDIRECT function into your VLOOKUP, as --

=VLOOKUP((B10,INDIRECT($A$1&"!A4:J4"),4,FALSE)

where A1 holds your sheetnames.
 
Upvote 0
In addition to Jon's solution, you can name your different ranges and use that name in the validated list and use,

=VLOOKUP(A1,INDIRECT(B1),2,0)

Where B1 contains the validated list.
 
Upvote 0
Thanks for all your help, although Jon added an Extra "(" in which confussed me for abit. Atleast I can get on, I'm sure I will be on here again to solve my problems.

:pray: We are not worthy
 
Upvote 0

Forum statistics

Threads
1,213,526
Messages
6,114,122
Members
448,550
Latest member
CAT RG

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