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!

Delete Rows

Status
Not open for further replies.

cmonthetic

IS-IT--Management
Oct 18, 2004
27
GB
Hi,

The spreadsheet I am working with has a large number of empty rows.

As the sheet is sent to me and it is made up of several other imported spreadsheets so I never know how many blank rows I am going to have.

I know that the cells in column A only every contain a serial number and are blank otherwise.

Is there a quick way of selecting the blank cells from column A and then deleting all of the blank rows.

TIA
 
Hi,

Use the AutoFilter.

Skip,

[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue]
 
Hi,

Thanks for the response SkipVought.

I really want to do this automatically by using a macro or something. Basically I just want to strip out all of the rows that do not contain any data.

Don't know if there is a way of doing this :|
 
Hi cmonthetic,

Select Column A
Edit > Goto > Special > Blanks
Press [blue]Ctrl -[/blue] (to delete) and choose Entire row

As this is the VBA forum, the code for that is:

[blue][tt] Columns("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete[/tt][/blue]

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 


The Macro Recorder is an excellent tool.

Macro record turning on the auto filter, filtering and deleting.

Then all you have to do is clean up your code.

Skip,

[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top