Try this.
Dim intAddress as Integer
' Find the address of the last cell
intAddress = ActiveCell.SpecialCells(xl
'Add one more to get the next blank row
intAddress = intAddress + 1
'Select column A and row of intAddress
Range("A:" & intAddress).Select
'Remove the row you are currently in and a row for your headers then you have a count of rows
intAddress = intAddress - 2
' Use the intAddress to sum what is in those rows
ActiveCell.FormulaR1C1 = "=SUM(R[-" & intAddress & "]C:R[-1]C)"
hth
Main Topics
Browse All Topics





by: zorvekPosted on 2007-09-25 at 11:02:58ID: 19957648
The SUM function can be used in an entire column. It will not add anything to the sum if the cells are empty.
Kevin