subtotal

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
 
R

Ron de Bruin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top