so what I have so far is the following:
For Each rng In Range("A1:BZ1")
If rng.Value = "057 - Interest Margin" Then
rng.EntireColumn.Cut
Sheets("Sheet1").Select
Columns("S:S").Select
Selection.Insert Shift:=xlToRight
End If
Next rng
What I am missing right now is that a new column and a specific header is added in case "057 - Interest Margin" cannot be found.
I came up with this but it screws up everything because it inserts the column 18 times????
For Each Rng In Range("A1:BZ1")
If Rng.Value = "057 - Interest Margin" Then
Rng.EntireColumn.Cut
Sheets("Sheet1").Select
Columns("S:S").Select
Selection.Insert Shift:=xlToRight
Else:
Columns("S:S").Select
Selection.Insert Shift:=xlToRight
Range("S1").Select
ActiveCell.FormulaR1C1 = "057 - Interest Margin"
Range("S2").Select
End If
Next Rng