Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Deleting empty cells

  Asked By: Arnold    Date: Jan 19    Category: MS Office    Views: 555
  

First let me state I am a complete excel VBA Noob.

I want to delete empty cells in a spreadsheet like the following:

2/24/06 174.10
2/27/06
2/27/06
2/27/06
2/27/06
2/27/06 26.00
2/28/06
2/28/06
2/28/06
2/28/06
2/28/06
2/28/06
2/28/06
2/28/06
2/28/06 144.30
3/1/06
3/1/06
3/1/06
3/1/06
3/1/06
3/1/06 321.20
3/2/06
3/2/06
3/2/06
3/2/06
3/2/06
3/2/06 121.20


I want to be able to remove all rows that do not have an entry in
column B. I have not idea how to do this, can someone help?

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Juanita Mason     Answered On: Jan 19

A simple solution in my mind is:

Select the relevant rows in column B,

Edit>Go to>Special>Select Blanks

This will select all blank rows. You can then delete  the selected rows by
Edit>Delete>Delete rows.

 
Answer #2    Answered By: Khadeeja Malik     Answered On: Jan 19

Which in VBA terms becomes:
Columns(2).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
for the whole of the active sheet.

 
Didn't find what you were looking for? Find more on Deleting empty cells Or get search suggestion and latest updates.




Tagged: