ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel macro (https://www.excelbanter.com/excel-programming/280084-excel-macro.html)

lowe_family \(remove this\) @msn.com

Excel macro
 
I have a table in Excel that I would lke to search column
A and delete all rows where the cell in column A is empty.

steve

Excel macro
 
The easiest way is to use
Select column A
Edit Go To Special Blanks
than Delete entire rows.
That is providing that the cells are truely empty and don't have a
formula...
You can record this and than use it again.

A trickier way is to do an Advanced filter with the criteria 0
Select column A
Edit Go To Special Visible cells
Copy
Paste on a new sheet

The hard way is to loop through code.

--
sb
"lowe_family (remove this) @msn.com"
wrote in message ...
I have a table in Excel that I would lke to search column
A and delete all rows where the cell in column A is empty.




[email protected]

Excel macro
 
Sub DeleteBlanks()
'' Deletes all rows that have blanks in Column A .
Columns("A").SpecialCells(xlCellTypeBlanks).Entire Row.Delete
End Sub

HTH
Paul
-------------------------------------------------------------------------------
I have a table in Excel that I would lke to search column
A and delete all rows where the cell in column A is empty.




All times are GMT +1. The time now is 12:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com