Sub Macro1()
Dim N&
Application.ScreenUpdating = False
With Cells(1).CurrentRegion
N = Application.CountBlank(.Columns(2))
If N Then
Cells(3).Resize(.Rows.Count).Formula = "=ISBLANK(B1)"
With .Resize(, 3).Rows
.Sort .Cells(3), xlAscending, Header:=xlNo
Union(.Columns(3), .Item(.Count - N + 1 & ":" & .Count)).Clear
End With
End If
.Columns(2).Cut Cells(3)
.Columns(1).TextToColumns , xlFixedWidth, FieldInfo:=Array([{0,9}], [{9,2}], [{18,9}], [{32,2}])
End With
Application.ScreenUpdating = True
End Sub
Do you like it ? So thanks to click on bottom left star icon « ★ Add Reputation » !
Bookmarks