Thanks AB33 but still no joy
I changed it to
Sub DelColumnNotInList2()
Dim i&, LC&, myrng1
Set myrng1 = Range("A1")
Application.ScreenUpdating = False
LC = Cells.Find("*", , , , xlByColumns, xlPrevious).Column
For i = LC To 1 Step -1
If InStr("Text1 Text2 text3 Text4 Text5 Text6 Text7 Text8 Text9 Text10", Cells(1, i).Text) = 0 Then
If myrng1 Is Nothing Then
Set myrng1 = Cells(1, i)
Else
Set myrng1 = Union(myrng1, Cells(1, i))
End If
End If
Next i
If Not myrng1 Is Nothing Then
myrng1.EntireColumn.Delete
End If
Application.ScreenUpdating = True
End Sub
But it still hangs on the EntireColumn.Delete line with Delete Methon Of Range Class failed
Any suggestions. Thanks very much for your patience.
Bookmarks