Range Selection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

If I have a Total's line on line A5000, and sometimes it jumps to 5001 upto
5020 or more...

Is there anyway to count the rows in between Lines 5000 and 5020 and then
have the rows deleted?

Any help would be greatly appreciated :)

Thank you!

Tim
 
For i = 5020 to 5000 step -1
If WorksheetFunction.CountA(Range(i & ":" & i)) = 0 Then Range("A" &
i).EntireRow.Delete
Next i
 
K Dales...Thx...Thats great :) YEAH!

Tim

K Dales said:
For i = 5020 to 5000 step -1
If WorksheetFunction.CountA(Range(i & ":" & i)) = 0 Then Range("A" &
i).EntireRow.Delete
Next i
 

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

Back
Top