Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
timsantiago
 
Posts: n/a
Default Using cell contents to reference worksheet names


I have a Workbook with about 20 worksheets (say, 'ABC', 'DEF', etc). I
also have a summary sheet within this workbook. So, *B1='ABC'*,
C1='DEF', etc. Column A is a list of all the information in my
worksheets. The rest is a tally of quantities of each row in each
worksheet.

I am performing an HLOOKUP of the info in Col A, and want to refer to
the worksheets in row 1 [=HLOOKUP(Cell A2,*ABC!*...]. My question is:
How can I use cell B1 (ABC), as part of my formula to reference my
worksheet, so when I drag my formula to column C, it will reference
cell C1 [DEF], and therefore, worksheet DEF? Directly using cells in
that function does not work [=HLOOKUP(Cell A2,*B1!*...] looks for sheet
B1, which does not exist...

Thank you.

Tim S.


--
timsantiago
------------------------------------------------------------------------
timsantiago's Profile: http://www.excelforum.com/member.php...o&userid=28656
View this thread: http://www.excelforum.com/showthread...hreadid=483242

  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default Using cell contents to reference worksheet names

Hi timsantiago

See the Excel help for the Indirect worksheet function

--
Regards Ron de Bruin
http://www.rondebruin.nl


"timsantiago" wrote in message
...

I have a Workbook with about 20 worksheets (say, 'ABC', 'DEF', etc). I
also have a summary sheet within this workbook. So, *B1='ABC'*,
C1='DEF', etc. Column A is a list of all the information in my
worksheets. The rest is a tally of quantities of each row in each
worksheet.

I am performing an HLOOKUP of the info in Col A, and want to refer to
the worksheets in row 1 [=HLOOKUP(Cell A2,*ABC!*...]. My question is:
How can I use cell B1 (ABC), as part of my formula to reference my
worksheet, so when I drag my formula to column C, it will reference
cell C1 [DEF], and therefore, worksheet DEF? Directly using cells in
that function does not work [=HLOOKUP(Cell A2,*B1!*...] looks for sheet
B1, which does not exist...

Thank you.

Tim S.


--
timsantiago
------------------------------------------------------------------------
timsantiago's Profile: http://www.excelforum.com/member.php...o&userid=28656
View this thread: http://www.excelforum.com/showthread...hreadid=483242



  #3   Report Post  
Duke Carey
 
Posts: n/a
Default Using cell contents to reference worksheet names

I'm not really clear how you are trying to go about this, but you need to use
the INDIRECT() function.

If the text value "ABC" is in cell A1, and you want to reference cell C10 on
the tab named "ABC", you'd use

=INDIRECT(A1&"!C10)



"timsantiago" wrote:


I have a Workbook with about 20 worksheets (say, 'ABC', 'DEF', etc). I
also have a summary sheet within this workbook. So, *B1='ABC'*,
C1='DEF', etc. Column A is a list of all the information in my
worksheets. The rest is a tally of quantities of each row in each
worksheet.

I am performing an HLOOKUP of the info in Col A, and want to refer to
the worksheets in row 1 [=HLOOKUP(Cell A2,*ABC!*...]. My question is:
How can I use cell B1 (ABC), as part of my formula to reference my
worksheet, so when I drag my formula to column C, it will reference
cell C1 [DEF], and therefore, worksheet DEF? Directly using cells in
that function does not work [=HLOOKUP(Cell A2,*B1!*...] looks for sheet
B1, which does not exist...

Thank you.

Tim S.


--
timsantiago
------------------------------------------------------------------------
timsantiago's Profile: http://www.excelforum.com/member.php...o&userid=28656
View this thread: http://www.excelforum.com/showthread...hreadid=483242


  #4   Report Post  
timsantiago
 
Posts: n/a
Default Using cell contents to reference worksheet names


Ron,

Thanks for your reply. I have tried to implement this into my formula,
but it's not working. I'm having a difficult time understanding how the
INDIRECT worksheet function works.

I reentered the formula as HLOOKUP(Cell
A2,INDIRECT(B$1),data_range,#,FALSE)... but how do you implement the
exclamation point used for worksheet referencing? Also, INDIRECT
doesn't seem to reference the desired worksheet, as my data range is
being highlighted within the summary sheet.


--
timsantiago
------------------------------------------------------------------------
timsantiago's Profile: http://www.excelforum.com/member.php...o&userid=28656
View this thread: http://www.excelforum.com/showthread...hreadid=483242

  #5   Report Post  
Duke Carey
 
Posts: n/a
Default Using cell contents to reference worksheet names

=HLOOKUP(Cell A2,INDIRECT(B$1&"!data_range",#,FALSE)


"timsantiago" wrote:


Ron,

Thanks for your reply. I have tried to implement this into my formula,
but it's not working. I'm having a difficult time understanding how the
INDIRECT worksheet function works.

I reentered the formula as HLOOKUP(Cell
A2,INDIRECT(B$1),data_range,#,FALSE)... but how do you implement the
exclamation point used for worksheet referencing? Also, INDIRECT
doesn't seem to reference the desired worksheet, as my data range is
being highlighted within the summary sheet.


--
timsantiago
------------------------------------------------------------------------
timsantiago's Profile: http://www.excelforum.com/member.php...o&userid=28656
View this thread: http://www.excelforum.com/showthread...hreadid=483242




  #6   Report Post  
timsantiago
 
Posts: n/a
Default Using cell contents to reference worksheet names


Since the requirements for INDIRECT are =INDIRECT(Ref_text,A1), the
",#,FALSE" didn't fit. The formula was modified as follows:

=HLOOKUP(Cell A2,INDIRECT(B$1&"!data_range"),#,FALSE)

Thanks for your help guys!


--
timsantiago
------------------------------------------------------------------------
timsantiago's Profile: http://www.excelforum.com/member.php...o&userid=28656
View this thread: http://www.excelforum.com/showthread...hreadid=483242

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
Maintaining cell reference after sorting GRITS Excel Discussion (Misc queries) 2 April 30th 23 07:42 PM
Reflect cell contents into another worksheet Vince Excel Discussion (Misc queries) 2 August 12th 05 04:36 PM
copying cell names Al Excel Discussion (Misc queries) 12 August 11th 05 03:01 PM
What worksheet function will formatlessly copy cell contents? MargueriteL Excel Worksheet Functions 1 June 7th 05 04:16 AM
Using a cell reference to refernce worksheet in another work book [email protected] Excel Worksheet Functions 5 January 6th 05 06:26 PM


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