C
Corrie
I am trying to total a range that is filtered to "X". My problem is
the range ("x"'d items) will change with new data. I was able to count
down to the last cell and execute a subtotal but it is a specified
range. Is there code I can use that will allow the range to be dynamic
(total whatever is filtered no matter the range)?
This is what I have...
Dim destCell As Range
Set destCell = Worksheets("6Pk").Cells(Rows.Count, "A") _
With destCell
.Offset(1, 0).Value = "Filled by 6Pk"
.Offset(1, 1).Value = "X"
.Offset(1, 2).FormulaR1C1 = "=SUBTOTAL(9,R[-335]C:R[-3]C)"
the range ("x"'d items) will change with new data. I was able to count
down to the last cell and execute a subtotal but it is a specified
range. Is there code I can use that will allow the range to be dynamic
(total whatever is filtered no matter the range)?
This is what I have...
Dim destCell As Range
Set destCell = Worksheets("6Pk").Cells(Rows.Count, "A") _
With destCell
.Offset(1, 0).Value = "Filled by 6Pk"
.Offset(1, 1).Value = "X"
.Offset(1, 2).FormulaR1C1 = "=SUBTOTAL(9,R[-335]C:R[-3]C)"