View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default find and delete rows macro

Try this. Change column to suit. To delete simply change
..select
to
..delete

Sub selectlastfive()
mc = 6 ' "f"
'Cells(Rows.Count, mc).End(xlUp).Resize(-5).Select
'since resize doesn't work for negative

Cells(Rows.Count, mc).End(xlUp).Offset(-4).Resize(5).Select
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"clayton ledford" wrote in
message ...
Hello,

I have created a macro to re-format a report i receive in excel. I'm
having
a problem adding the following instruction.

I need to use the macro to find and select the last five rows, then delete
those rows. This is a problem because the report length varies each day
when
i receive the report.

Even if there is one to find and select just the last row. I can repeat 5
times.

Clay