Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Using contents of a cell as the sheet name in another formula

I am trying to use the contents of a cell as the sheet name in another formula.

A B
1 Res A ='Res A'!C4
2 Res B ='Res B'!C4

Right now, 'Res A' and 'Res B' in column B are hard coded. I want them to
refer to the text in column A so when I copy the formulas down, the
references are updated automatically instead of having to do it manually.
Once we make that work, the equation I really need to embed the variable
sheet names in is a little more complicated, and looks like this:

B C
4 Res A =INDEX('Res A'!$A$1:$AZ$256, MATCH($A$1,'Res
A'!$A$1:$A$256,),
MATCH(C$1,'Res A'!$A$1:$AZ$1,))

Where all 3 instances of 'Res A' need to be replaced by a variable expression.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Using contents of a cell as the sheet name in another formula

Instead of:
='Res A'!C4
use
=Indirect(A1 & "!C4")

You can change the content of A1 and the sheet reference will also change.
--
Gary''s Student - gsnu200803


"sbird" wrote:

I am trying to use the contents of a cell as the sheet name in another formula.

A B
1 Res A ='Res A'!C4
2 Res B ='Res B'!C4

Right now, 'Res A' and 'Res B' in column B are hard coded. I want them to
refer to the text in column A so when I copy the formulas down, the
references are updated automatically instead of having to do it manually.
Once we make that work, the equation I really need to embed the variable
sheet names in is a little more complicated, and looks like this:

B C
4 Res A =INDEX('Res A'!$A$1:$AZ$256, MATCH($A$1,'Res
A'!$A$1:$A$256,),
MATCH(C$1,'Res A'!$A$1:$AZ$1,))

Where all 3 instances of 'Res A' need to be replaced by a variable expression.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Using contents of a cell as the sheet name in another formula

Since you have spaces in the worksheet name, you could use:

=indirect("'" & a1 & "'!c4")



sbird wrote:

I am trying to use the contents of a cell as the sheet name in another formula.

A B
1 Res A ='Res A'!C4
2 Res B ='Res B'!C4

Right now, 'Res A' and 'Res B' in column B are hard coded. I want them to
refer to the text in column A so when I copy the formulas down, the
references are updated automatically instead of having to do it manually.
Once we make that work, the equation I really need to embed the variable
sheet names in is a little more complicated, and looks like this:

B C
4 Res A =INDEX('Res A'!$A$1:$AZ$256, MATCH($A$1,'Res
A'!$A$1:$A$256,),
MATCH(C$1,'Res A'!$A$1:$AZ$1,))

Where all 3 instances of 'Res A' need to be replaced by a variable expression.


--

Dave Peterson
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
transfer contents from a cell in previous sheet if the sheet is a DarkNight New Users to Excel 1 September 9th 08 01:04 AM
Returning contents of a cell in another sheet in same workbook Annette[_2_] Excel Discussion (Misc queries) 1 March 14th 07 04:04 PM
Displaying cell contents on one sheet Peter J Watson Excel Discussion (Misc queries) 2 April 28th 06 12:25 AM
Lookup cell contents in on sheet based on a formula in second sheet Michael Wright via OfficeKB.com Excel Worksheet Functions 1 April 30th 05 04:11 PM
Cell contents vs. Formula contents Sarah Excel Discussion (Misc queries) 3 December 15th 04 06:02 PM


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