View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Macro for cell selection starting with Last Cell

I used column A to find the last row of the worksheet.

Dim LastRow as long
with activesheet
lastrow = .cells(.rows.count,"A").end(xlup).row
if lastrow < 16 then
msgbox "are you on the correct sheet?"
exit sub
end if

.rows(lastrow -16 + 1 & ":" & .rows.count).delete
end with


Valerie wrote:

I want to go to the last cell on the worksheet and select it along with 16
prior cells in order to delete the last 16 rows of the worksheet at once
instead of deleting one row at a time.

Thanks!
Valerie


--

Dave Peterson