View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default VB Script to insert row and calculate a range


Dim LastRow As Long
LastRow = Cells(Rows.Count, "F").End(xlUp).Row
Cells(LastRow + 1, "S").FormulaR1C1 = "=SUM(R1C19:R[-1]C19)"


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"rlee1999" wrote in message
...
Sorry, I am new to this. Please forgive my ignorance.

I recorded a macro that sorts items first by class (ie.108 or 217 located

in
column F) and then by dollar amount (located in column S). There may be 10
items in a class.

I need the script to locate the last occurance of the class number (Column
F) on the sheet and then insert a row below.

The script needs to sum the dollar amounts in the new row in Column S.

I would appreciate any help I can get.

~Robert