Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
summing only certain rows | Excel Discussion (Misc queries) | |||
Summing column and rows | Excel Discussion (Misc queries) | |||
Summing Alternate Rows | Excel Discussion (Misc queries) | |||
Summing all rows with certain specification | Excel Worksheet Functions | |||
Summing rows | Excel Programming |