View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Trevor Shuttleworth Trevor Shuttleworth is offline
external usenet poster
 
Posts: 1,089
Default Finding and Deleting last row

Sub ClearLastRow()
' assuming column A has data in all rows ...
Range("A65536").End(xlUp).EntireRow.ClearContents
End Sub

Regards

Trevor


"Bourbon" wrote in message
...

Hi, I'm learning VB and have a problem. It is very simple: I have a
spread sheet for which I am writing a macro to 1) Delete the contents
of the first row...this is done and then 2) find the last row with
content and delete the content. I am having trouble writing the code
for 2....

I have : lastrow.select
selection.clearcontents

Can anyone help?

Regards


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/