Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() I have a workbook that contains several tabs named by years (eg Y2001, Y2002, Y2003...). Is there a syntax that would reference a cell whose worksheet is based on the result of a formula? So, for example, if the formula resulted in 2002, it would return the A1 value in the Y2002 worksheet instead of any of the others Something like this perhaps? ="Y"&formula_that_gives_a_year_value!A1 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You need the INDIRECT function.
-- David Biddulph "Matt" wrote in message ... I have a workbook that contains several tabs named by years (eg Y2001, Y2002, Y2003...). Is there a syntax that would reference a cell whose worksheet is based on the result of a formula? So, for example, if the formula resulted in 2002, it would return the A1 value in the Y2002 worksheet instead of any of the others Something like this perhaps? ="Y"&formula_that_gives_a_year_value!A1 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You need to do it like this:
=INDIRECT("'Y" & your_formula & "'!A1") The apostrophes are in there in case you have spaces in the sheet names. Hope this helps. Pete On Apr 25, 1:02*pm, Matt wrote: I have a workbook that contains several tabs named by years (eg Y2001, Y2002, Y2003...). Is there a syntax that would reference a cell whose worksheet is based on the result of a formula? *So, for example, if the formula resulted in 2002, it would return the A1 value in the Y2002 worksheet instead of any of the others Something like this perhaps? ="Y"&formula_that_gives_a_year_value!A1 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Perfect, thanks!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Syntax for using variables in a cell formula to reference paths/fi | Excel Worksheet Functions | |||
VBA Syntax for using a variable in a worksheet function | Excel Discussion (Misc queries) | |||
Syntax to return the value of a control by reference | Excel Discussion (Misc queries) | |||
what is the correct syntax for an allowable circular reference? | Excel Discussion (Misc queries) | |||
Syntax to check protected status of a worksheet? | Excel Discussion (Misc queries) |