Insert columns with VBA

harveya915

Board Regular
Joined
Sep 4, 2015
Messages
141
A bit of a novice here. I usually try to find my answers first before posting, although I kinda found an answer on a thread here, when asking for help I was told to start a new thread. So...

I have a sheet with 5 columns (C-G). I need to insert 5 columns with the same formatting and formulas (only columns C and G have formulas) into columns C-G, making the previous group of columns mover over on to I-M. Leaving column H as a blank column to distinguish where one group of column ends and the other begin.
Each group of columns will have the same headings/titles. This will be Row 3.
On Row 2 above each group of columns i merged the cells so that a date can be input.
I created a button on a UserForm so that when it is clicked, it performs the above operation. Every time it is clicked it inserts 5 new columns as described above.

Any help would be greatly appreciated.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top