LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding Sum to bottom of Col C for all Sheets in Array


Hi

You could try this code
Sub loop_worksheets()
Dim MyArray, MyInt
sheet_count = ActiveWorkbook.Sheets.Count
'Changes this for your worksheets
MyArray = Array("Sheet1", "Sheet2", "Sheet3")
For j = 0 To sheet_count - 1
sname = MyArray(j)
Sheets(sname).Select
rowcount = Cells(Cells.Rows.Count, "c").End(xlUp).Row
Range("c" & rowcount + 1).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-" & rowcount & "]C:R[-1]C)"
Next
End Sub


--
jetted
------------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php...o&userid=17532
View this thread: http://www.excelforum.com/showthread...hreadid=561047

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
search an array in reverse (bottom to top) order Trainer_00 Excel Discussion (Misc queries) 5 December 20th 07 10:35 PM
Is it possible to display the row of tabs (sheets) at the bottom across two rows? JEFF Excel Discussion (Misc queries) 1 April 17th 07 01:30 AM
Adding in row at bottom of range Graham Haughs Excel Programming 4 March 27th 06 08:03 PM
Adding info in the row at the bottom using macro? Carrie Excel Discussion (Misc queries) 1 April 14th 05 04:18 PM
2 questions sheets displayed at bottom Mary Agnes Excel Programming 1 March 1st 04 03:05 PM


All times are GMT +1. The time now is 05:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"