I found the following macro in another thread:
Option Explicit
Sub DeleteColumns()
Dim a As Long
Application.ScreenUpdating = False
For a = 15 To 1 Step -1
Select Case Cells(1, a).Value
Case "ACTION", "PROVINCE", "TIME", "INTID"
Cells(1, a).EntireColumn.Delete
End Select
Next a
Application.ScreenUpdating = True
End Sub
assuming everything is apples to apples, how do you change "For a = 15 To 1 Step -1" to check all columns and not a specified amount?
In other words one spreadsheet might have 15 columns whereas another might have 220.
Thanks!
Bookmarks