inser column T

add an column blank between

this is how is

a12.PNG

this is how should be  

b12.PNGinsercolumn.xlsx
ADRIANA PACCOUNTING ASSISTANTAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Roy CoxGroup Finance ManagerCommented:
Not sure what you mean, but maybe

   
 Sheet1.Columns("T:T").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove

Open in new window

ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Roy Cox

Thnks for the fast reponse

could be an button  to  add the columns

between the data
Roy CoxGroup Finance ManagerCommented:
Well, just add a button and attach the code
insercolumn.xlsm
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Roy Cox

need be for each column with data
Roy CoxGroup Finance ManagerCommented:
What do you mean? You asked to insert Column T
Roy CoxGroup Finance ManagerCommented:
Do you mean like this

Edit, corrected code
insercolumn.xlsm
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Like this?
insercolumn.xlsm

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NerdsOfTechTechnology ScientistCommented:
Fabrice LambertConsultingCommented:
@Roy:
At least, provide a safe code:
Sub RectangleRoundedCorners1_Click()
    Dim Col As Long
    
    With ThisWorkbook.Sheets(1)
        Col = .Cells(6, .Columns.Count).End(xlToLeft).Column

        For Col = 2 To Col Step 2
            .Columns(Col).Insert Shift:=xlToRight
        Next
    End With
End Sub

Open in new window

Roy CoxGroup Finance ManagerCommented:
What???
Fabrice LambertConsultingCommented:
@NerdsOfTech:
Alas, not everyone have the liberty to install 3rd party Tools or add-in. Nice link tho.

@Roy:
The global Columns collection implicitly refer to the ActiveWorkbook.ActiveWorksheet.Columns collection.
Wich guarantee do you have that ActiveWorkbook is the workbook holding the code ?
And wich guarantees do you have that ActiveWorksheet is the one one wich the code will be applied ?
Roy CoxGroup Finance ManagerCommented:
The button is on the sheet, so to click it  the workbook must be active and the sheet must be active!
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
@Roy
You only missed a dot before columns, nothing else.
Don't take him seriously. Cool. :)
Fabrice LambertConsultingCommented:
@Roy:
This is a special use case (Ok, I admit it happen most of the time).
What if the function is called from somewhere else ?
Roy CoxGroup Finance ManagerCommented:
Not my problem, Adriana asked for a button so my comments stand
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Great Job!

;)

Best Experts !

 Roy Cox, Fabrice Lamber  , Subodh Tiwari (Neeraj)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VBA

From novice to tech pro — start learning today.