Excel 2003 - Need Macro for Insert Column in excel
Hi All,
I am using Excel Version 2003
I have macro already and addition to that i need to add one more command or run macro that insert column and name that column as "Month" in every sheet of an excel.
I have header row i want to insert the column after the header name Volume
Can any one help in this
Thanks in advance
This my macro
Sub DelColumnNotInList()
Dim LastCol As Double
Dim ColCtr As Double
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
LastCol = ws.Cells(1, ws.Columns.Count).End(xlToLeft).Column
For ColCtr = 1 To LastCol
If InStr("Word Pay Cost Volume Rank Type", ws.Cells(1, ColCtr).Text) = 0 Then
ws.Columns(ColCtr).Delete
ColCtr = ColCtr - 1
End If
Next
Next
End Sub
|