Column Subtotal Question
Something like this:
Dim lastrow as Long
lastrow = .Cells(.Rows.Count, "C").End(xlUp).Row
.Cells(lastrow, "C").Activate
ActiveCell.FormulaR1C1 = "=sum(r6c:r[-1]c)"
HTH,
Ryan---
--
RyGuy
"brentm" wrote:
I have a spreadsheet that I need to add a column subtotal for column C and
column D. the number of rows will vary from one run to the next. the other
issue I have is that all rows with a value in column D are listed (by sort)
below all rows with a value in column C. I can add subtotals, but I do not
know how to set the range to be dynamic. Also, I need the subtotals to be 2
rows below the last row with a value in column D. I am stumped!
|