Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code which sums column O until a blank cell is
found. It puts the sum in the blank cell then continues down the column doing same. I want to have the total go into another column and row. Can anyone help by tweaking the code so I can achieve this end ??? Sub sum() EndRow = Cells(Rows.Count, "O").End(xlUp).Row firstRow = 2 RowCount = 2 Do While RowCount <= EndRow + 1 If IsEmpty(Cells(RowCount, "O")) Then lastRow = RowCount - 1 Cells(RowCount, "O").FormulaR1C1 = _ "=SUM(R" & CStr(firstRow) & "C15:R" & _ CStr(lastRow) & "C15)" firstRow = RowCount + 1 RowCount = RowCount + 1 End If RowCount = RowCount + 1 Loop End Sub Big thanks. Colwyn. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. | Excel Programming | |||
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... | Excel Programming | |||
Excel code convert to Access code - Concat & eliminate duplicates | Excel Programming |