subtotal

  • Thread starter Thread starter projectside
  • Start date Start date
P

projectside

i need to run a code that would subtotal my spreadsheet. my problem i
that I won't know what my real last cell is because the spreadshee
will have different number of data everytime i run the report.

i need the subtotal to be in column E through L and the row number wil
be whatever the real last cell is.

please hel
 
This will sum the E column for example
This formula will be two cell below the last value

Range("E" & Rows.Count).End(xlUp).Offset(2, 0).FormulaR1C1 = "=SUM(R1C:R[-2]C)"

You can make a loop through your columns
 
Back
Top