Finding sheets

  • Thread starter Thread starter Andrew Clark
  • Start date Start date
A

Andrew Clark

I'm just an inquisitive person, I guess ;-)

I would like to create the name of a particular sheet dynamically, then
read data from it. For example,

="'"&MONTH(A1)&"."&DAY(A1)&"."&TEXT(MOD(YEAR(A1),100),"00")&"-"&MONTH(B1)
&"."&DAY(B1)&"."&TEXT(MOD(YEAR(B1),100),"00")&"'!"&"A3:A50"

That will give me the name of a particular sheet. A start date and end
date are in A36 and B36, respectively.

I would like to take the name of the sheet created above and perform some
calculation on it, such as,

=SUM(B1)

If the above formula was entered in B1. This doesn't work, obviously. Can
this be done?

Thanks again,
Andrew
 
Andrew,

=INDIRECT("'" & A2 & "'!"&"B1")

If your sheet-name formula is in A2, this will give you what's in cell B1 of
that sheet. FOr your SUM formula, it might look like:

=SUM(INDIRECT("'" & A2 & "'!"&"B1"))
 
Andrew,

=INDIRECT("'" & A2 & "'!"&"B1")

If your sheet-name formula is in A2, this will give you what's in cell
B1 of that sheet. FOr your SUM formula, it might look like:

=SUM(INDIRECT("'" & A2 & "'!"&"B1"))

Thanks! That's exactly what I wanted.
 
Back
Top