delete columns with 0 in single row
Hi all, the code below essentially works but i don't want it to sort. If I
remove cells.select down to Application.goto...it no longer works properly.
Cells.Select
Selection.Sort Key1:=Range("A2"), _
Orientation:=xlLeftToRight
Application.Goto Reference:="R2C1"
While IsEmpty(ActiveCell) = False
If ActiveCell = 0 Then
ActiveCell.EntireColumn.Delete
ElseIf ActiveCell 0 Then
ActiveCell.Offset(0, 1).Range("A1").Select
End If
Wend
|