View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mudraker[_220_] mudraker[_220_] is offline
external usenet poster
 
Posts: 1
Default Adding "TOTAL" and summing column

Fred

Try thnis

Code gets row number of last used cell in Column H


Dim LastRow As Long

LastRow = Cells(Rows.Count, "h") _
.End(xlUp).Row

Cells(LastRow + 2, "h").Value = "TOTAL"

Cells(LastRow + 2, "j").Value = _
"=sum(j4:j" & LastRow & ")

--
Message posted from http://www.ExcelForum.com