I'm seeking a macro to insert a column to the right of columns C:N and R:W.
Thank you in advance for your help.
I'm seeking a macro to insert a column to the right of columns C:N and R:W.
Thank you in advance for your help.
To the right of each column from C:N and R:W, or just one column to the right of R:W and C:N?
A dream is not something you see when you are asleep, but something you strive for when you are awake.
It's usually a bad idea to say that something can't be done.
The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve
Join us at Facebook
Try this One..
Code:Public Sub InsertColumns() Dim intCol As Integer Const strCol = "N:N" 'Here Just add the last Columns charactor Like "C:N"'s - N:N Const strSheetName = "Sheet1" ''Here just add the sheet Name Const intTotal = 5 'Here Pass the number of columns that you want to add With ThisWorkbook.Worksheets(strSheetName) For intCol = 1 To intTotal .Columns(strCol).Insert xlRight Next End With End Sub
Regards
Prince
Bookmarks