Avatar of ADRIANA P
ADRIANA PFlag for United States of America asked on

inser column T

add an column blank between

this is how is

a12.PNG

this is how should be  

b12.PNGinsercolumn.xlsx
VBAMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
ADRIANA P

8/22/2022 - Mon
SOLUTION
Roy Cox

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
ADRIANA P

Roy Cox

Thnks for the fast reponse

could be an button  to  add the columns

between the data
Roy Cox

Well, just add a button and attach the code
insercolumn.xlsm
ASKER
ADRIANA P

Roy Cox

need be for each column with data
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Roy Cox

What do you mean? You asked to insert Column T
Roy Cox

Do you mean like this

Edit, corrected code
insercolumn.xlsm
ASKER CERTIFIED SOLUTION
Subodh Tiwari (Neeraj)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
NerdsOfTech

Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Roy Cox

What???
Fabrice Lambert

@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 Cox

The button is on the sheet, so to click it  the workbook must be active and the sheet must be active!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Subodh Tiwari (Neeraj)

@Roy
You only missed a dot before columns, nothing else.
Don't take him seriously. Cool. :)
Fabrice Lambert

@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 Cox

Not my problem, Adriana asked for a button so my comments stand
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
ADRIANA P

Great Job!

;)

Best Experts !

 Roy Cox, Fabrice Lamber  , Subodh Tiwari (Neeraj)