Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I refer to cell in another worksheet in a formula | Excel Worksheet Functions | |||
Use cell contents to refer to a sheetname in a formula | Excel Worksheet Functions | |||
Refer to a worksheet/name using cell contents? | Excel Worksheet Functions | |||
how do I refer a cell to workbook name not worksheet | Excel Discussion (Misc queries) | |||
refer to last cell in worksheet? | Excel Worksheet Functions |