Thursday, January 09, 2014

Adding Dynamic Column to Excel

Adding Dynamic Column to Excel
Following function will add one column at  location D for all the sheets in opened excel document.

Sub AddColumnUPdateHeader()


For X = 1 To Worksheets.Count
 Sheets(X).Select
 Columns("D:D").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove


Next X

End Sub

No comments: