Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding data amongst empty cells | Excel Discussion (Misc queries) | |||
Finding First Empty Cell in a Column | Excel Discussion (Misc queries) | |||
Finding First Empty Cell in a Column | Excel Discussion (Misc queries) | |||
How do I sort with empty rows between none empty rows? | Excel Worksheet Functions | |||
finding all empty excel files in a folder. | Excel Discussion (Misc queries) |