I'm trying to go down every column and delete blanks by pasting up but I think I have an error in my coding. I have a date associated with number so I actually have to shift up two columns for every cell but I think the problem lies with the IsEmpty Cell Function.
If anyone has another way to approach this please reply, thank you.
If IsEmpty(ActiveCell.Select) Then
ActiveCell.Offset(0, -1).Range("A1").Select
Selection.End(xlUp).Select
ActiveCell.Offset(2, -1).Range("A1").Select
ElseIf IsEmpty(Active.Offset(0, 1).Range("A1").Select) Then
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Cut
ActiveCell.Offset(-1, 0).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(-2, 1).Range("A1").Select
ActiveCell.Offset(1, 0).Range("A1").Select
End If
If anyone has another way to approach this please reply, thank you.
If IsEmpty(ActiveCell.Select) Then
ActiveCell.Offset(0, -1).Range("A1").Select
Selection.End(xlUp).Select
ActiveCell.Offset(2, -1).Range("A1").Select
ElseIf IsEmpty(Active.Offset(0, 1).Range("A1").Select) Then
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Cut
ActiveCell.Offset(-1, 0).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(-2, 1).Range("A1").Select
ActiveCell.Offset(1, 0).Range("A1").Select
End If