Loop back word
![]()
Sub DelColumnNotInList1() Dim LastCol As Long, ColCtr As Long Application.ScreenUpdating = 0 LastCol = Cells(1, Columns.Count).End(xlToLeft).Column For ColCtr = LastCol To 1 Step -1 If InStr("Text1 Text2 text3 Text4 Text5 Text6 Text7 Text8 Text9 Text10", Cells(1, ColCtr).Text) = 0 Then Columns(ColCtr).Delete End If Next ColCtr Application.ScreenUpdating = True End Sub
Bookmarks