![]() |
Deleting Null Cells
I would like a macro that deletes All Null Cells in a spreadsheet.
For Example aaa Null 123 bbb 123 Null 123 Would look like aaa 123 bbb 123 123 I would like the Null Cells Delete and everything to come to the left. |
Deleting Null Cells
Try this:
Sub DeleteBlankCells() ActiveSheet.Cells.SpecialCells(xlCellTypeBlanks).S elect Selection.Delete Shift:=xlToLeft Range("A1").Select End Sub Hope this helps, Hutch "GOL" wrote: I would like a macro that deletes All Null Cells in a spreadsheet. For Example aaa Null 123 bbb 123 Null 123 Would look like aaa 123 bbb 123 123 I would like the Null Cells Delete and everything to come to the left. |
Deleting Null Cells
Thanks
"Tom Hutchins" wrote: Try this: Sub DeleteBlankCells() ActiveSheet.Cells.SpecialCells(xlCellTypeBlanks).S elect Selection.Delete Shift:=xlToLeft Range("A1").Select End Sub Hope this helps, Hutch "GOL" wrote: I would like a macro that deletes All Null Cells in a spreadsheet. For Example aaa Null 123 bbb 123 Null 123 Would look like aaa 123 bbb 123 123 I would like the Null Cells Delete and everything to come to the left. |
All times are GMT +1. The time now is 01:56 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com