I don't want to use Send key

G

Guest

Hi, I have monthly report that arrives to my e-mail, my problem is that in
this report I have in column A the numbers from 1 to 65,000 and in columns B,
C, D, E,F, and G (where I have the records of sales amounts and other datas)
the records
my problem is that the number of rows used are aprx 3000 (depends on each
month) and althought there is just 3000 rows used the entire column A is
numered, how to make a macro to delete de other 62000 rows that arn't used??

PD. With out sendkeys

TIA
 
G

Guest

Give this a try...

Sub DeleteExtraRows()
Dim wks As Worksheet

Set wks = Sheets("Sheet1")
wks.Range("B65536", wks.Range("B65536").End(xlUp).Offset(1,
0)).EntireRow.Delete
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top