Inserting a SUM Function
I need to add a sum formula to some cells on a sheet.
this code fills the ceels that I need to total:
mRow = 4
With Sheets("Street Summary")
For nStreet = 1 To streetNum
.Cells(mRow, 1).Value = streetStats(nStreet, 1)
.Cells(mRow, 2).Value = streetStats(nStreet, 2)
.Cells(mRow, 3).Value = streetStats(nStreet, 3)
.Cells(mRow, 4).Value = streetStats(nStreet, 4)
.Cells(mRow, 5).Value = streetStats(nStreet, 5)
mRow = mRow + 1
Next nStreet
End With
I need to total each of the columns from column 2 thru 5 (Column 1 is a text
label).
So in cell ( row = mRow, col = 2) I need to generate a formula that will
total cells (row = 4, col =2) thru cells (row = 4 + streetNum, Col = 2).
I hope I explained this weel enbough to get som ehelp.
Thanks,
Ken Looms
|