View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Johnny Johnny is offline
external usenet poster
 
Posts: 126
Default How to del last two rows

the last 2 rows that I want to del is not the last two rows of the worksheet.
the last 2 rows I want to del is in my report, sometime the last two rows at
row 258 and 259. or 158,159, or 236,237.

"jlclyde" wrote:

On Nov 20, 12:39 pm, Johnny wrote:
Hi Guys.
It dosn't matter how many row in the worksheet.
how to create a formula or macro to del only the last two rows.


All worksheets have the same number of rows. If you want to delete
rows 65536 and 65535 that is a simple macro.
Sub Deletelast2rows()

Range("A65535", "IV65536").Delete

End Sub
If you want the last two rows that have something in them then that is
a little trickier.

You will use End(xl(up)
Jay