A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Dynamic sheet reference in Name formula



 
 
Thread Tools Display Modes
  #1  
Old April 30th, 2010, 04:45 AM posted to microsoft.public.excel.worksheet.functions
Raj[_4_]
external usenet poster
 
Posts: 27
Default Dynamic sheet reference in Name formula

Hi,

The name "CurrentMonth" is defined using the following formula:

=OFFSET('Apr-10'!$H$5,0,0,COUNTA('Apr-10'!$H$5:$H$500),20)

The workbook has 12 sheets with names from Apr-10 to Mar-11. These
will be placed in a data validation list in cell A1

Requirement: The sheet name in the formula to dynamically change with
the value selected in cell A1. ie if the value in cell A1 is Jun-10
then the sheet name i the formula should be replaced with Jun-10. Is
this possible or any other way to achieve this?

Thanks in advance for the help.

Regards.
Raj
  #2  
Old April 30th, 2010, 09:55 AM posted to microsoft.public.excel.worksheet.functions
Bob Phillips[_3_]
external usenet poster
 
Posts: 489
Default Dynamic sheet reference in Name formula

Try

=OFFSET(INDIRECT("'"&$A$1&"'!$H$5"),0,0,COUNTA(IND IRECT("'"&$A$1&"'!$H$5:$H$500")),20)

--

HTH

Bob

"Raj" wrote in message
...
Hi,

The name "CurrentMonth" is defined using the following formula:

=OFFSET('Apr-10'!$H$5,0,0,COUNTA('Apr-10'!$H$5:$H$500),20)

The workbook has 12 sheets with names from Apr-10 to Mar-11. These
will be placed in a data validation list in cell A1

Requirement: The sheet name in the formula to dynamically change with
the value selected in cell A1. ie if the value in cell A1 is Jun-10
then the sheet name i the formula should be replaced with Jun-10. Is
this possible or any other way to achieve this?

Thanks in advance for the help.

Regards.
Raj



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.