#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 331
Default Worksheet Name

I am trying to use Vlookup where the table_array refers to data on another
worksheet. However I have three worksheets with different data in the same
format. I have a cell which returns the Worksheet name ie 'Grating', 'Steel'
or 'Bolts'. How do I use this in vlookup. I seem to keep getting an error. I
have tried Concatenating name and data array, but it seems not to evaluate
the string..

Any help would be greatly appreciated.
--
Greg McLandsborough
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default Worksheet Name

As I recall, you need to use indirect to do this. I think it's like this

=VLOOKUP(A1,indirect("'Sheet1!A2:B100").2,false)

If you concatenate information together, make sure you hae a single quote
before and after the sheet name.
--
HTH,
Barb Reinhardt



"Greg" wrote:

I am trying to use Vlookup where the table_array refers to data on another
worksheet. However I have three worksheets with different data in the same
format. I have a cell which returns the Worksheet name ie 'Grating', 'Steel'
or 'Bolts'. How do I use this in vlookup. I seem to keep getting an error. I
have tried Concatenating name and data array, but it seems not to evaluate
the string..

Any help would be greatly appreciated.
--
Greg McLandsborough

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default Worksheet Name

Assuming the worksheet name (Grating, Steel, Bolts) is in cell A1 and the
lookup array is A10:B15 on the other sheets and the lookup value is in A2
then:
=VLOOKUP(A2,INDIRECT(A1&"!A10:B15"),2,FALSE) will lookup A2 in the lookup
array and return the value from column B for an exact match in column A

Tyro


"Greg" wrote in message
...
I am trying to use Vlookup where the table_array refers to data on another
worksheet. However I have three worksheets with different data in the same
format. I have a cell which returns the Worksheet name ie 'Grating',
'Steel'
or 'Bolts'. How do I use this in vlookup. I seem to keep getting an error.
I
have tried Concatenating name and data array, but it seems not to evaluate
the string..

Any help would be greatly appreciated.
--
Greg McLandsborough



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default Worksheet Name

That will work if the worksheet name has no spaces. If it has spaces, you
must use 'Sheet Name'. I've had issues with the ' in the past though.
Sometimes it pulls something from A1 and sometimes it doesn't.
--
HTH,
Barb Reinhardt



"Tyro" wrote:

Assuming the worksheet name (Grating, Steel, Bolts) is in cell A1 and the
lookup array is A10:B15 on the other sheets and the lookup value is in A2
then:
=VLOOKUP(A2,INDIRECT(A1&"!A10:B15"),2,FALSE) will lookup A2 in the lookup
array and return the value from column B for an exact match in column A

Tyro


"Greg" wrote in message
...
I am trying to use Vlookup where the table_array refers to data on another
worksheet. However I have three worksheets with different data in the same
format. I have a cell which returns the Worksheet name ie 'Grating',
'Steel'
or 'Bolts'. How do I use this in vlookup. I seem to keep getting an error.
I
have tried Concatenating name and data array, but it seems not to evaluate
the string..

Any help would be greatly appreciated.
--
Greg McLandsborough




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default Worksheet Name

The OP said his sheet names are Grating, Steel and Bolts. Those names have
no spaces and do not require single quotes around them. Thus I did not put
the single quotes in the formula.

Tyro

"Barb Reinhardt" wrote in message
...
That will work if the worksheet name has no spaces. If it has spaces,
you
must use 'Sheet Name'. I've had issues with the ' in the past though.
Sometimes it pulls something from A1 and sometimes it doesn't.
--
HTH,
Barb Reinhardt



"Tyro" wrote:

Assuming the worksheet name (Grating, Steel, Bolts) is in cell A1 and the
lookup array is A10:B15 on the other sheets and the lookup value is in A2
then:
=VLOOKUP(A2,INDIRECT(A1&"!A10:B15"),2,FALSE) will lookup A2 in the lookup
array and return the value from column B for an exact match in column A

Tyro


"Greg" wrote in message
...
I am trying to use Vlookup where the table_array refers to data on
another
worksheet. However I have three worksheets with different data in the
same
format. I have a cell which returns the Worksheet name ie 'Grating',
'Steel'
or 'Bolts'. How do I use this in vlookup. I seem to keep getting an
error.
I
have tried Concatenating name and data array, but it seems not to
evaluate
the string..

Any help would be greatly appreciated.
--
Greg McLandsborough






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
Unable to Insert Worksheet/Move and copy worksheet Excel 2003 lukerush Excel Worksheet Functions 2 September 7th 06 05:05 PM
plot graph from multiple worksheet as embedded chart object on every worksheet [email protected] Excel Worksheet Functions 2 August 24th 06 05:26 PM
plot graph from multiple worksheet as embedded chart object on every worksheet jeftiong New Users to Excel 0 August 23rd 06 01:50 PM
Upload multiple text files into 1 excel worksheet + put the filename as the first column in the worksheet Aster Excel Worksheet Functions 3 March 12th 06 09:58 AM
I want in one worksheet to relatively link to/reference cells in another without changing the format of the current worksheet. [email protected] Excel Discussion (Misc queries) 0 September 22nd 05 04:39 PM


All times are GMT +1. The time now is 01:17 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"