Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using contents of cell to refer to a worksheet

I have worksheets that I would like to reference in
formulas using cells containing the worksheet names. How
do I use cell contents as the names worksheets in
formulas? For example, assume I have 12 worksheets
titled January, February, March, etc. And in a 13th
worksheet I have a column containing the values January
or February or March etc. If I want to use that column
to refer to cells in one of the 12 worksheets, how do I
use those cell contents as the worksheet name in the
actual formula? There must be some syntax that allows me
to do that.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Using contents of cell to refer to a worksheet

=SheetName!CellAddress
examples:
=January!A1
=February!B47
=March!D3


"Mike" wrote in message
...
I have worksheets that I would like to reference in
formulas using cells containing the worksheet names. How
do I use cell contents as the names worksheets in
formulas? For example, assume I have 12 worksheets
titled January, February, March, etc. And in a 13th
worksheet I have a column containing the values January
or February or March etc. If I want to use that column
to refer to cells in one of the 12 worksheets, how do I
use those cell contents as the worksheet name in the
actual formula? There must be some syntax that allows me
to do that.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using contents of cell to refer to a worksheet

To clarify, I am referring to the use of cell contents as the worksheet
name, not the exact name itself. So in call A1 I have the contents
"January". I need to know how to use A1 (the contents therein) as the
name of the worksheet.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Using contents of cell to refer to a worksheet

Tried to work out what you're describing, in a formula before I posted, but
didn't have any luck
Here is a VBA method that builds the formula.

Sub HeadingInFormula()

Dim sHdColTwo As String
Dim sHdColThree As String
Dim sHdColFour As String

sHdColTwo = Range("Sheet1!B1").Value
sHdColThree = Range("Sheet1!C1").Value
sHdColFour = Range("Sheet1!D1").Value

Range("Sheet1!B3").Formula = "=" & sHdColTwo & "!B3"
Range("Sheet1!C3").Formula = "=" & sHdColThree & "!B3"
Range("Sheet1!D3").Formula = "=" & sHdColFour & "!B3"


End Sub

"Mike E" wrote in message
...
To clarify, I am referring to the use of cell contents as the worksheet
name, not the exact name itself. So in call A1 I have the contents
"January". I need to know how to use A1 (the contents therein) as the
name of the worksheet.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



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 do I refer to cell in another worksheet in a formula Jim Excel Worksheet Functions 2 October 11th 08 10:37 PM
Use cell contents to refer to a sheetname in a formula cp Excel Worksheet Functions 6 September 29th 08 06:56 PM
Refer to a worksheet/name using cell contents? Caeres Excel Worksheet Functions 5 September 23rd 08 03:23 AM
how do I refer a cell to workbook name not worksheet esparzaone Excel Discussion (Misc queries) 2 October 2nd 07 09:18 PM
refer to last cell in worksheet? svh646 Excel Worksheet Functions 2 July 25th 06 01:23 AM


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