ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sum in multiple sheets (https://www.excelbanter.com/excel-programming/289346-sum-multiple-sheets.html)

hans[_3_]

sum in multiple sheets
 
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



Tom Ogilvy

sum in multiple sheets
 
Indirect would be what you would use, but it doesn't work with 3D
references. So no, you can't.

--
Regards,
Tom Ogilvy

hans wrote in message
...
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





David

sum in multiple sheets
 
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



-----Original Message-----
Indirect would be what you would use, but it doesn't

work with 3D
references. So no, you can't.

--
Regards,
Tom Ogilvy

hans wrote in message
...
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




.



All times are GMT +1. The time now is 10:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com