sum in multiple sheets

  • Thread starter Thread starter hans
  • Start date Start date
H

hans

I want to sum cel c4 from muliple sheets.
I know that i could use:
SUM('01:02'!C4)

The trouble is i do not know how many sheets i am going to make
So i have a function FIRSTSCHEET
I also have a function called LASTSHEET

What i would like is something like

SUM(Firstscheet():Lastsheet()!C4)

Is this posible

Greetings Hans
 
Indirect would be what you would use, but it doesn't work with 3D
references. So no, you can't.
 
Might be able to adapt something from this:
Sub Macro3()
FirstSheetName = Sheets(1).name
LastSheet = Sheets(Sheets.Count).Name
ActiveCell.FormulaR1C1 = "=SUM(" & (FirstSheetName)
& ":" & (LastSheet) & "!RC)"
End Sub
 
Back
Top