This should be simple, but I can't figure it out.
Pseudo code for what I want to do:
What I am trying to do is search for a column heading, select and cut that column and then paste it in a certain location such as Column A. However, if that selection is already in Column A, it will fail. Hence, I need an IF ELSE but I am no VBA wizard.
Code I already have
Thanks for any and all help.
Pseudo code for what I want to do:
Code:
IF current selection (column) <> Column A
THEN Paste Current Selection to the left of Column A
ELSE break and move on to next statement
What I am trying to do is search for a column heading, select and cut that column and then paste it in a certain location such as Column A. However, if that selection is already in Column A, it will fail. Hence, I need an IF ELSE but I am no VBA wizard.
Code I already have
Code:
With Range("1:1")
'First Move
.Find("LEGACY_AGREEMENT_NO").EntireColumn.Cut
Columns("A:A").Select
Selection.Insert Shift:=xlToLeft
'Next Move
.Find("LEGACYAGREEMENT_ITEM_NO").EntireColumn.Cut
Columns("C:C").Select
Selection.Insert Shift:=xlToLeft
End With
Thanks for any and all help.