how to search for blank cells and delete ?

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Not sure if you prefer vba or not but here is the non-vba method. Select the rows/columns where you want to search for blanks. Press F5, click Special and select blanks. This will automatically select all blanks in the selected area. These can then be deleted in the HOME tab ->Delete.
Alex
 
Upvote 0
Blank cells where ??
AND
Do you only want to delete the cell or the row ??
By deleting blank cells within a range of data, any adjacent data will be incorrect once the blank cell is deleted ??
 
Upvote 0
Not sure if you prefer vba or not but here is the non-vba method. Select the rows/columns where you want to search for blanks. Press F5, click Special and select blanks. This will automatically select all blanks in the selected area. These can then be deleted in the HOME tab ->Delete.
Alex


I prefer vba.. running the macro ..
 
Upvote 0
Blank cells where ??
I have a list of data like around thousands , most of the rows are blank and its in between two data.
Idea: I want to delete all the blank rows and do a filter ( A to Z)


AND
Do you only want to delete the cell or the row ?? I want to delete the row.
By deleting blank cells within a range of data, any adjacent data will be incorrect once the blank cell is deleted ??

Answers in red
 
Upvote 0
are the blanks in any particular column ??
 
Upvote 0
If the blanks are in Col "A", try
Code:
Sub MM1()
With Columns("A")
    .AutoFilter field:=1, Criteria1:=""
    .Resize(Rows.Count - 1).Offset(1).EntireRow.Delete
    .AutoFilter
End With
End Sub
 
Upvote 0
If the blanks are in Col "A", try
Code:
Sub MM1()
With Columns("A")
    .AutoFilter field:=1, Criteria1:=""
    .Resize(Rows.Count - 1).Offset(1).EntireRow.Delete
    .AutoFilter
End With
End Sub


Actually its in a random places.
no particular place .

The file is generated from the system thus it is not stardardized
 
Last edited:
Upvote 0
So, if the blanks are random, and you want the rows deleted, won't you be losing data in any other cells in the deleted row ??
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,485
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top