View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default 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