#1   Report Post  
jsteele
 
Posts: n/a
Default Lookup function

I am using the following lookup function to return a value. I am currently
using one sheet for the values. I need to be able to use a number of sheets
representing different counties and values. The formula looks like this
=VLOOKUP(F12,Sheet1!B2:N53,2)

I would like to be able to vary the Sheet1 to be different counties and
equal a cell where the user would imput the county name. The sheets would be
named the same.

Can this be done??

Jeff
  #2   Report Post  
Duke Carey
 
Posts: n/a
Default

Give the range Sheet1!B2:N53 the name of the county, e.g., "Cuyahoga"

Then, if the word Cuyahoga is in cell A1, use

=VLOOKUP(F12,INDIRECT(A1),2)


"jsteele" wrote:

I am using the following lookup function to return a value. I am currently
using one sheet for the values. I need to be able to use a number of sheets
representing different counties and values. The formula looks like this
=VLOOKUP(F12,Sheet1!B2:N53,2)

I would like to be able to vary the Sheet1 to be different counties and
equal a cell where the user would imput the county name. The sheets would be
named the same.

Can this be done??

Jeff

  #3   Report Post  
Rlmccants
 
Posts: n/a
Default


Try this...


=VLOOKUP(F12,Indirect($B$1),2,0)

In cell B1, you can enter the country name such as France.


Also, for each country, go to the respective sheet, select this range
B2:N53, and name the country...France, Greece, Italy, etc. Populating
cell B1 with the same name.


--
Rlmccants
------------------------------------------------------------------------
Rlmccants's Profile: http://www.excelforum.com/member.php...o&userid=26097
View this thread: http://www.excelforum.com/showthread...hreadid=395131

  #4   Report Post  
jsteele
 
Posts: n/a
Default

Thanks, I will try and get back to you.

Jeff

"Duke Carey" wrote:

Give the range Sheet1!B2:N53 the name of the county, e.g., "Cuyahoga"

Then, if the word Cuyahoga is in cell A1, use

=VLOOKUP(F12,INDIRECT(A1),2)


"jsteele" wrote:

I am using the following lookup function to return a value. I am currently
using one sheet for the values. I need to be able to use a number of sheets
representing different counties and values. The formula looks like this
=VLOOKUP(F12,Sheet1!B2:N53,2)

I would like to be able to vary the Sheet1 to be different counties and
equal a cell where the user would imput the county name. The sheets would be
named the same.

Can this be done??

Jeff

  #5   Report Post  
jsteele
 
Posts: n/a
Default

This is getting me closer. The problem is that there is multiple ranges on
each sheet that i need to access. Is there a way to continue using the range
ie, B2:N53 for this function and then other for different functions but have
the sheet name only change by entering it into a cell on the main page.

jeff

"Rlmccants" wrote:


Try this...


=VLOOKUP(F12,Indirect($B$1),2,0)

In cell B1, you can enter the country name such as France.


Also, for each country, go to the respective sheet, select this range
B2:N53, and name the country...France, Greece, Italy, etc. Populating
cell B1 with the same name.


--
Rlmccants
------------------------------------------------------------------------
Rlmccants's Profile: http://www.excelforum.com/member.php...o&userid=26097
View this thread: http://www.excelforum.com/showthread...hreadid=395131




  #6   Report Post  
jsteele
 
Posts: n/a
Default

I have tried your advise and found that the problem is solved for that
paticular range but will not solve my problem for other ranges on the same
county sheet. Is there a way to make just the sheet name variable. I thought
there might be a way to imbed a function inside a function but have been not
be able to get it to work correctly. Do you have any other suggestions.

Thank you in advance
Jsteele

"jsteele" wrote:

This is getting me closer. The problem is that there is multiple ranges on
each sheet that i need to access. Is there a way to continue using the range
ie, B2:N53 for this function and then other for different functions but have
the sheet name only change by entering it into a cell on the main page.

jeff

"Rlmccants" wrote:


Try this...


=VLOOKUP(F12,Indirect($B$1),2,0)

In cell B1, you can enter the country name such as France.


Also, for each country, go to the respective sheet, select this range
B2:N53, and name the country...France, Greece, Italy, etc. Populating
cell B1 with the same name.


--
Rlmccants
------------------------------------------------------------------------
Rlmccants's Profile: http://www.excelforum.com/member.php...o&userid=26097
View this thread: http://www.excelforum.com/showthread...hreadid=395131


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
LOOKUP function haroldhagar Excel Worksheet Functions 2 August 6th 05 07:38 PM
lookup function 1 Colboyfx Excel Worksheet Functions 4 July 15th 05 09:15 AM
Lookup function returning reference, not value Caligula Excel Worksheet Functions 1 May 28th 05 06:35 PM
Lookup Function Problem seve Excel Discussion (Misc queries) 9 February 28th 05 02:46 AM
Lookup function w/Text and Year Josh O. Excel Worksheet Functions 1 February 12th 05 11:27 PM


All times are GMT +1. The time now is 11:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"