Dim r As Range
Set r = Rows(1).Find(What:="YourColumnName",LookIn:=xlValues,LookAt:=xlWhole)
'check if found:
If Not r Is Nothing Then
'found so insert:
r.EntireColumn.Insert 'inserts column to left, r.Offset(,1).EntireColumn.Insert to insert to right
Else
MsgBox "Column name not found!"
End If
Monday, February 20, 2012
Posted by AG at 7:28 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment