Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 181
Default XL2002 - VLOOKUP with variable Sheet Name

Hi All

I am trying to create a formula to look up data on a sheet that has a
variable sheet name. Here's the current formula:

=VLOOKUP(E7,'ac1'!A1:D10,3,FALSE)

What I need to do is change the 'ac1' to another name based on which sheet
the user is looking at. The sheet name could be ac1, ac2, ac3 etc - the
number that appears in the sheet name exists in cell A1 on the sheet that the
formula is in.

I have tried creating the sheet name in cell B1 using ="ac"&A1, and then
trying to reference that in the vlookup formula but it doesn't work.

Any help gratefully received.

Regards
Trevor Williams
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default XL2002 - VLOOKUP with variable Sheet Name

Suppose your sheet number is in A1, then change your formula to this:

=VLOOKUP(E7,INDIRECT("'ac"&A1&"'!A1:D10"),3,FALSE)

Hope this helps.

Pete

On Jul 29, 5:10*pm, Trevor Williams
wrote:
Hi All

I am trying to create a formula to look up data on a sheet that has a
variable sheet name. *Here's the current formula:

=VLOOKUP(E7,'ac1'!A1:D10,3,FALSE)

What I need to do is change the 'ac1' to another name based on which sheet
the user is looking at. *The sheet name could be ac1, ac2, ac3 etc - the
number that appears in the sheet name exists in cell A1 on the sheet that the
formula is in.

I have tried creating the sheet name in cell B1 using ="ac"&A1, and then
trying to reference that in the vlookup formula but it doesn't work.

Any help gratefully received.

Regards
Trevor Williams


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 181
Default XL2002 - VLOOKUP with variable Sheet Name

Blimey - that's gotta be the quickest response I've had on a forum!
Thanks Pete, I'll give it a go.


"Pete_UK" wrote:

Suppose your sheet number is in A1, then change your formula to this:

=VLOOKUP(E7,INDIRECT("'ac"&A1&"'!A1:D10"),3,FALSE)

Hope this helps.

Pete

On Jul 29, 5:10 pm, Trevor Williams
wrote:
Hi All

I am trying to create a formula to look up data on a sheet that has a
variable sheet name. Here's the current formula:

=VLOOKUP(E7,'ac1'!A1:D10,3,FALSE)

What I need to do is change the 'ac1' to another name based on which sheet
the user is looking at. The sheet name could be ac1, ac2, ac3 etc - the
number that appears in the sheet name exists in cell A1 on the sheet that the
formula is in.

I have tried creating the sheet name in cell B1 using ="ac"&A1, and then
trying to reference that in the vlookup formula but it doesn't work.

Any help gratefully received.

Regards
Trevor Williams



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default XL2002 - VLOOKUP with variable Sheet Name

You're welcome, Trevor - I just happened to be browsing when your post
came through.

Pete

On Jul 29, 5:26*pm, Trevor Williams
wrote:
Blimey - that's gotta be the quickest response I've had on a forum!
Thanks Pete, I'll give it a go.



"Pete_UK" wrote:
Suppose your sheet number is in A1, then change your formula to this:


=VLOOKUP(E7,INDIRECT("'ac"&A1&"'!A1:D10"),3,FALSE)


Hope this helps.


Pete


On Jul 29, 5:10 pm, Trevor Williams
wrote:
Hi All


I am trying to create a formula to look up data on a sheet that has a
variable sheet name. *Here's the current formula:


=VLOOKUP(E7,'ac1'!A1:D10,3,FALSE)


What I need to do is change the 'ac1' to another name based on which sheet
the user is looking at. *The sheet name could be ac1, ac2, ac3 etc - the
number that appears in the sheet name exists in cell A1 on the sheet that the
formula is in.


I have tried creating the sheet name in cell B1 using ="ac"&A1, and then
trying to reference that in the vlookup formula but it doesn't work.


Any help gratefully received.


Regards
Trevor Williams- Hide quoted text -


- Show quoted text -


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
How To make a sheet reference Variable (eq: sum(sheet!D2:H2)) John Linker Excel Discussion (Misc queries) 3 June 16th 08 11:29 PM
Semi-hang in XL2002 Charlie Excel Discussion (Misc queries) 0 May 6th 06 04:53 PM
HOW TO COPY XL2000 (XP) MACROS TO XL2002 (XP) will A Excel Discussion (Misc queries) 0 January 16th 06 06:48 PM
variable in a link where the variable is the name of the sheet darrelly Excel Worksheet Functions 1 October 7th 05 08:24 AM
Using min and max function XL2002 Extremely Aggravated Excel Worksheet Functions 1 September 23rd 05 06:29 PM


All times are GMT +1. The time now is 06:00 AM.

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

About Us

"It's about Microsoft Excel"