#1   Report Post  
Posted to microsoft.public.excel.misc
GOL GOL is offline
external usenet poster
 
Posts: 2
Default 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.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default 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.


  #3   Report Post  
Posted to microsoft.public.excel.misc
GOL GOL is offline
external usenet poster
 
Posts: 2
Default 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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
protect cells in excel to prevent users from deleting formulae locking cells in excel Excel Discussion (Misc queries) 2 June 14th 06 06:56 PM
Deleting and shifting cells and columns Curt1521 Excel Worksheet Functions 7 May 8th 06 05:14 PM
Deleting info from all cells at once days_crazed Excel Worksheet Functions 2 April 17th 06 04:40 PM
Help adding text values Texas-DC_271 Excel Worksheet Functions 7 January 16th 05 12:14 AM
delete values in several cells without deleting the formulas dranreb Excel Discussion (Misc queries) 4 December 9th 04 02:15 AM


All times are GMT +1. The time now is 08:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"