Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Deleting blank cells in a column

I am wanting to select all blank cells in this column, delete the blank cell,
then have the numbers in the colums to the right of them shift over in their
place. Is this possible with a code in a macro??? THANKS!!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Deleting blank cells in a column

Give this code a try. Change the range to whatever column you need...

Sub DeleteBlanks()
Dim rngToDelete As Range

On Error Resume Next
Set rngToDelete = Range("A:A").SpecialCells(xlCellTypeBlanks)
On Error GoTo 0

If rngToDelete Is Nothing Then
MsgBox "Nothin to Delete..."
Else
rngToDelete.Delete xlToLeft
End If
End Sub
--
HTH...

Jim Thomlinson


"bodhisatvaofboogie" wrote:

I am wanting to select all blank cells in this column, delete the blank cell,
then have the numbers in the colums to the right of them shift over in their
place. Is this possible with a code in a macro??? THANKS!!!

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
Deleting blank cells globally MrHanky Excel Discussion (Misc queries) 4 May 21st 09 03:25 PM
deleting rows with blank cells after a specified column? MYR Excel Discussion (Misc queries) 3 January 9th 09 09:13 PM
Deleting blank cells savbci Excel Programming 2 July 29th 05 06:25 PM
Deleting blank cells in a column KatyLady Excel Discussion (Misc queries) 6 May 30th 05 03:47 PM
Deleting a row if column K is blank andycharger Excel Programming 3 December 1st 03 01:52 PM


All times are GMT +1. The time now is 03:32 PM.

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

About Us

"It's about Microsoft Excel"