LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Pls help: macro to delete empty rows

I have a worksheet with over 1100 rows, but with data only in every
few rows. The other rows are "empty" (ISBLANK is true). I need a
macro to delete the empty rows.

Using Record Macro, I see that if I select a row and right-click
Delete, the logic is:

Rows("2:2").Select
Selection.Delete shift:=xlUp

So in my ignorance, I tried the following, to no avail:

Dim cell As Range
For Each cell In Range("1:1144")
If cell = "" Then
cell.Rows.Delete shift:=xlUp
End If
Next

So how can I do this?

PS: Also, I forgot how to turn off/on the worksheet update. And if
I need to do this iteratively, as above, I would like to go from the
bottom up so that the shift xlUp is more efficient.

Many thanks.
 
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
Delete Empty Rows Macro yepiknowiam Excel Programming 6 August 22nd 08 10:53 PM
Delete empty rows with macro by John Walkenbach Steve G Excel Programming 2 August 3rd 07 01:47 PM
Delete Rows with Empty Cells with empty column 1 Scott Excel Programming 5 October 2nd 06 11:57 PM
How do I write a macro to delete all rows from the first empty ro. Jon M[_3_] Excel Programming 2 May 12th 05 06:01 PM
Cut and Paste macro based on criteria then delete empty rows samst Excel Programming 4 November 2nd 03 09:33 PM


All times are GMT +1. The time now is 10:20 AM.

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

About Us

"It's about Microsoft Excel"