View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
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!!!