Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Macro Needed to Delete Blank Rows

12 views
Skip to first unread message

William E. Hall

unread,
May 16, 1998, 3:00:00 AM5/16/98
to

I have a spreadsheet with approximately 6000 rows. Somewhere around 40%
of the rows are blank. I would like to develop a macro to delete the
blank rows and retain the ones with numbers/text. I'm very new to the
idea of macros (other than those that can be recorded), though it strikes
me that something as simple as what I'm trying to do should
be--well--simple to set up. Any ideas on where I can start?

Will

--
William E. Hall <wha...@gmu.edu>
Institute for Conflict Analysis and Resolution
http://www.gmu.edu/departments/ICAR
George Mason University
http://www.gmu.edu

DMcRitchie

unread,
May 17, 1998, 3:00:00 AM5/17/98
to

For a macro -- John Walkenbach in PC World Magazine online
http://www.pcworld.com/software/spreadsheet/articles/oct97/1510p342.html

Non macro solution -- Chip Pearson
http://home.gvi.net/~cpearson/noblanks.htm

>William E. Hall <wha...@gmu.edu>

Dana De

unread,
May 17, 1998, 3:00:00 AM5/17/98
to

I like to use the following. SpecialCells limits itself to the UsedRange of
your worksheet. Therefore, it will not be wasting time deleting rows to the
bottom of the worksheet. In other words, the blank cells outside the used
range are not selected / deleted to save time.

On Error Resume Next ' In case there are no blanks
Columns("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
ActiveSheet.UsedRange 'Resets UsedRange for Excel 97


William E. Hall wrote in message ...

0 new messages