Delete a blank cell and shift left

  • Thread starter Thread starter jrb
  • Start date Start date
J

jrb

I need to figure out a way to take a range, and for each blank cell i
that range delete it and shuft it left. Is there an easy way to d
this?


Thanks JR
 
Sub ShiftBlankCellLeft()
'assumes going down current column starting at currentcell location
For i = ActiveCell.Row To Cells(Rows.Count, ActiveCell.Column).End(xlUp).Row
If ActiveCell.Value = "" Then
Selection.Delete Shift:=xlToLeft
End If
ActiveCell.Offset(1, 0).Select ' assumes moving down a column
Next i
End Sub
I need to figure out a way to take a range, and for each blank cell in
that range delete it and shuft it left. Is there an easy way to do
this?


Thanks JRB
 
Back
Top