Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default use Cell text as sheet reference

Hello,

I have several worksheets in my workbook(1)

and in workbook (2) all the sheet names of workbook(1) in Cells A1 thru
X1

can i use the text in cell A1 thru X1 in a formula to reference the
workbook(1)

for example in cell A2 instead of ='[Workbook 1.xls]Sheet1l'!$A$2 can
i reference Cell A1 in workbook (2) instead of sheet1, since in
workbook (2) cell A1 contains text "sheet1 "

I am looking for a straight formula rather than VBA

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default use Cell text as sheet reference

You can construct references completely from cell text. For example in Book2:

in A1 put Book1
in A2 put accounts
in A3 put B9

The formula:
=INDIRECT("[" & A1 & ".xls]" & A2 & "!" & A3)
will give the same result as the forrmula:
=[Book1.xls]accounts!$B$9

--
Gary's Student


"Abdul" wrote:

Hello,

I have several worksheets in my workbook(1)

and in workbook (2) all the sheet names of workbook(1) in Cells A1 thru
X1

can i use the text in cell A1 thru X1 in a formula to reference the
workbook(1)

for example in cell A2 instead of ='[Workbook 1.xls]Sheet1l'!$A$2 can
i reference Cell A1 in workbook (2) instead of sheet1, since in
workbook (2) cell A1 contains text "sheet1 "

I am looking for a straight formula rather than VBA


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default use Cell text as sheet reference

Give this a try:
In your Wb2:

=INDIRECT("'[YourWb1.xls]"& $A$1&"'!A1")
=INDIRECT("'[YourWb1.xls]"& $B$1&"'!A1")
=INDIRECT("'[YourWb1.xls]"& $C$1&"'!A1")

YourWb1 MUST BE OPEN!! << In order for it to work.

Jim May


"Abdul" wrote in message
ups.com:

Hello,

I have several worksheets in my workbook(1)

and in workbook (2) all the sheet names of workbook(1) in Cells A1 thru
X1

can i use the text in cell A1 thru X1 in a formula to reference the
workbook(1)

for example in cell A2 instead of ='[Workbook 1.xls]Sheet1l'!$A$2 can
i reference Cell A1 in workbook (2) instead of sheet1, since in
workbook (2) cell A1 contains text "sheet1 "

I am looking for a straight formula rather than VBA


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default use Cell text as sheet reference

thanks for the reply.

I find it working but as an absolute reference. When I want to copy the
formula to the next cell instead of A2 it gives A1 since "!A1" is fixed
as a rext. How I can get it to work when I copy the formula to the next
cell so the formula should look like

=INDIRECT("'[YourWb1.xls]"& $C$1&"'!A2")
if i put A1 out of quotes then it refers to the active sheet rather
than the other workbook cell

thanks



Jim May wrote:
Give this a try:
In your Wb2:

=INDIRECT("'[YourWb1.xls]"& $A$1&"'!A1")
=INDIRECT("'[YourWb1.xls]"& $B$1&"'!A1")
=INDIRECT("'[YourWb1.xls]"& $C$1&"'!A1")

YourWb1 MUST BE OPEN!! << In order for it to work.

Jim May


"Abdul" wrote in message
ups.com:

Hello,

I have several worksheets in my workbook(1)

and in workbook (2) all the sheet names of workbook(1) in Cells A1 thru
X1

can i use the text in cell A1 thru X1 in a formula to reference the
workbook(1)

for example in cell A2 instead of ='[Workbook 1.xls]Sheet1l'!$A$2 can
i reference Cell A1 in workbook (2) instead of sheet1, since in
workbook (2) cell A1 contains text "sheet1 "

I am looking for a straight formula rather than VBA


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
Reference text in a cell inside a formula to specify a sheet name navel151 Excel Worksheet Functions 5 February 20th 10 07:47 AM
Nesting a sheet name reference within a cell reference??? Broyston Excel Discussion (Misc queries) 9 July 8th 08 08:35 PM
Changing sheet reference to cell reference TeeJay Excel Worksheet Functions 3 October 19th 07 11:50 AM
How do I reference data from a sheet specified by text in a cell RedWolf Excel Worksheet Functions 1 January 20th 06 08:03 PM
can I reference a sheet name in a cell as text? Karl Barthel Excel Worksheet Functions 1 November 21st 05 10:15 PM


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