Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 60
Default Worksheet reference syntax?


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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Worksheet reference syntax?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Worksheet reference syntax?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 60
Default Worksheet reference syntax?

Perfect, thanks!
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
Syntax for using variables in a cell formula to reference paths/fi colorado808 Excel Worksheet Functions 4 March 15th 07 03:41 AM
VBA Syntax for using a variable in a worksheet function xjetjockey Excel Discussion (Misc queries) 3 January 9th 07 04:23 AM
Syntax to return the value of a control by reference Broadband Al Excel Discussion (Misc queries) 3 January 26th 06 01:20 AM
what is the correct syntax for an allowable circular reference? excell idiot Excel Discussion (Misc queries) 1 March 10th 05 05:17 PM
Syntax to check protected status of a worksheet? [email protected] Excel Discussion (Misc queries) 2 January 18th 05 02:53 PM


All times are GMT +1. The time now is 04:40 PM.

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"