Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Finding Empty Rows


On Error Resume Next
range("A2:A25001").SpecialCells(xlBlanks).EntireRo w.Delete
On Error goto 0

Regards,
Tom Ogilvy

"Kevin G" wrote in message
...
I have a spreadsheet with approx. 25,000 rows in it. Some
of those rows are completely blank. I wrote a FOR/NEXT
loop to find and delete those rows, but it's not working
exactly how I want. Here's what I wrote:

range("a2:a25001").select
dim acell as range
for each acell in selection
if acell = "" then
acell.entirerow.delete
end if
next acell

After running this it seems that it finds a few of the
empty rows, deletes them, and then stops looking.
Am I doing something wrong?? Any help would be appreciated.

Thanks,

Kevin



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding data amongst empty cells James Excel Discussion (Misc queries) 6 November 10th 09 04:35 PM
Finding First Empty Cell in a Column TomHull Excel Discussion (Misc queries) 5 November 9th 09 01:19 AM
Finding First Empty Cell in a Column TomHull Excel Discussion (Misc queries) 0 November 9th 09 12:21 AM
How do I sort with empty rows between none empty rows? Excel Challenged Excel Worksheet Functions 1 August 17th 06 03:59 PM
finding all empty excel files in a folder. jackm1 Excel Discussion (Misc queries) 4 July 20th 05 11:23 PM


All times are GMT +1. The time now is 04:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"