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

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

just_jon

Legend
Joined
Sep 3, 2002
Messages
10,473
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.
 

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
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.
 

boggis2000

New Member
Joined
Feb 2, 2004
Messages
3
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
 
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,560
Messages
5,765,091
Members
425,258
Latest member
brentmitchell

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
Top