write a macro to insert columns based on Cell Values

vpapolu

New Member
Joined
May 2, 2014
Messages
3
I have a worksheet where I must insert a column every time the user selects 2 values (found in Pricelists sheet).

So Basically whenever a user chooses the Quote LP, or the Sell on web Values from the cell dropdown, I must insert a column adjacent to the value. (The dropdown values are referred from another worksheet in the same workbook)

So for example if a user selects cell A1 and selects Sell on web from the dropdown, a column must appear between A and B. The column must read "List Price", in cell B1.

If the new list price column can have a "collapse" button in cell H5 that will cause the column to hide, that would be amazing as well.

Thank you and I apprecaite any and all the help!!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Watch MrExcel Video

Forum statistics

Threads
1,130,364
Messages
5,641,712
Members
417,230
Latest member
emmah44

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
Top