Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove empty rows from the sheet 1

Status
Not open for further replies.

barnard90

IS-IT--Management
Mar 6, 2005
73
US
I have a worksheet with employee data. It has only one column which has employee ids

All employee ids are in one column , one row after the other . However , there are some blank cells in between the employee ids.

I would like to permanently delete those empty rows
There are exactly 960 rows now in the employee id column
The column is first column ( 1) in Sheet1

Please suggest a VBA Code to delete the blank rows from the sheet

Thanks
 
Perhaps this ?
ActiveSheet.Columns(1).SpecialCells(xlCellTypeBlanks).EntireRow.Delete

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 



Hi,

When deleting rows, ALWASY loop from the bottom of the range, upward, otherwise you'll loose reference.

Comsider using SORT instead. However, you must SELECT the entire table explicitly.

Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top