Link to home
Start Free TrialLog in
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

User generated image

this is how should be  

User generated imageinsercolumn.xlsx
SOLUTION
Avatar of Roy Cox
Roy Cox
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ADRIANA P

ASKER

Roy Cox

Thnks for the fast reponse

could be an button  to  add the columns

between the data
Well, just add a button and attach the code
insercolumn.xlsm
Roy Cox

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

Edit, corrected code
insercolumn.xlsm
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What???
@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 ?
The button is on the sheet, so to click it  the workbook must be active and the sheet must be active!
@Roy
You only missed a dot before columns, nothing else.
Don't take him seriously. Cool. :)
@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 ?
Not my problem, Adriana asked for a button so my comments stand
Great Job!

;)

Best Experts !

 Roy Cox, Fabrice Lamber  , Subodh Tiwari (Neeraj)