ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Summing through spreadsheets (https://www.excelbanter.com/excel-programming/368195-summing-through-spreadsheets.html)

AndrewCrisp[_4_]

Summing through spreadsheets
 

Can anyone help me with the programming for summing through
spreadsheets.

I have the following code

ActiveCell.FormulaR1C1 = "=SUM('180002594:999999999'!RC)"

where 180002594 and 999999999 are the first and last sheet names, but
they can be different so I either want to pick up the first to the last
(whatever their names) somehow or all visible worksheets, excluding the
sheet that is totalling the rest.

Thanks

Andrew


--
AndrewCrisp
------------------------------------------------------------------------
AndrewCrisp's Profile: http://www.excelforum.com/member.php...o&userid=36653
View this thread: http://www.excelforum.com/showthread...hreadid=564485


Bob Phillips

Summing through spreadsheets
 
ActiveCell.FormulaR1C1 = "=SUM('" & Worksheets(1).Name & ":" & _
Worksheets(Worksheets.Count).Name & "'!RC)"


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"AndrewCrisp"
wrote in message
...

Can anyone help me with the programming for summing through
spreadsheets.

I have the following code

ActiveCell.FormulaR1C1 = "=SUM('180002594:999999999'!RC)"

where 180002594 and 999999999 are the first and last sheet names, but
they can be different so I either want to pick up the first to the last
(whatever their names) somehow or all visible worksheets, excluding the
sheet that is totalling the rest.

Thanks

Andrew


--
AndrewCrisp
------------------------------------------------------------------------
AndrewCrisp's Profile:

http://www.excelforum.com/member.php...o&userid=36653
View this thread: http://www.excelforum.com/showthread...hreadid=564485




AndrewCrisp[_5_]

Summing through spreadsheets
 

Bob

Many thanks. I am just a beginner at VBA but a little bit of help goe
a long way.

Thanks

Andre

--
AndrewCris
-----------------------------------------------------------------------
AndrewCrisp's Profile: http://www.excelforum.com/member.php...fo&userid=3665
View this thread: http://www.excelforum.com/showthread.php?threadid=56448



All times are GMT +1. The time now is 02:04 AM.

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