Hi,
Trying to basically have certain Columns deleted based on the Header's title.
This is my code so far, but I can't get it to work.
Sub DeleteHeaderColumn()
Dim FindThis As String
Dim FoundIt As Range
Do
FindThis = (Array("Batch", "Straps", "Straps Verified"))
Rows("1:1").Select
Set FoundIt = Rows(1).Find(What:=FindThis, Lookat:=xlPart, MatchCase:=False)
If FountIt Is Nothing Then Exit Do
FoundIt.EntireColumn.Delete Shift:=xlToLeft
Loop
End Sub
Basically any Columns from A:Z on the 1st row with Headers titled "Batch", "Straps", "Straps Verified" should be deleted but, VBA keeps skipping them.
I know I'm missing something.
Any help would be greatly appreciated, thanks.
Bookmarks