View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Referring to Sheet locations in a formula

Try this:

A1 = the last sheet number = 10

=SUMPRODUCT(SUMIF(INDIRECT("sheet"&ROW(INDIRECT("2 :"&A1))&"!C1"),"<"))

This will sum Sheet2:Sheet10!C1

Biff

"PCLIVE" <pclive(remove wrote in message
...
In VBA, sheets can be referred to by either name or location.
Example:
Sheets("Sheet2").Activate
or
Sheets(2).Activate

Is there a way to refer to sheet locations in a formula? For example, I'd
like to sum cell C1 on sheets 2 through 10 (the last sheet will be
determined in a cell on sheet1).

I'm thinking it will be an array, but I'm not sure about referring to
sheet locations in a formula.

Thanks In Advance.
Paul