LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Summing rows

I want to sum the integer elements from row 2 to row 9 inclusive, then
display it in a cell a couple rows below the last element, say row 14.
The trick though, is I am iterating through each column in the worksheet.

Sub SortEachColumn()
Range("A14") = "Best 8 Marks"
Range("A15") = "Total Possible"
Range("A16") = "Total Mark"
lc = cells(2, "iv").End(xlToLeft).Column
For i = 2 To lc
lr = cells(Rows.Count, i).End(xlUp).Row
Next i
End Sub

Notice in line 6, where it goes to the end (End(xlUp)), that is too far. I
only want from row 2 to row 9 inclusive, and then display the sum in row 14
of that column
 
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
summing only certain rows rodchar Excel Discussion (Misc queries) 2 April 7th 09 09:10 PM
Summing column and rows L. Howard Kittle Excel Discussion (Misc queries) 4 November 14th 06 05:00 AM
Summing Alternate Rows KarenQ Excel Discussion (Misc queries) 2 August 11th 05 09:27 PM
Summing all rows with certain specification martin Excel Worksheet Functions 2 January 7th 05 01:43 PM
Summing rows Kelly[_7_] Excel Programming 1 January 26th 04 05:14 PM


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

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"