I need a Macro to insert a line below and copy SOME data

Yanks2011

New Member
Joined
May 7, 2011
Messages
1
I have data and at the midpoint cell in the row there is a yes and no button for the user to click, depending on the need for data entry below. "YES" would mean that there was additional job costing necessary on an employees work performed that week. No would mean that the employee only worked at their home store and all hours should be charged to the default work location.

I need to run a macro that will:


  1. If a "YES" button is pressed in a cell on the sheet, then a row will be inserted below it, and will automatically copy all of the data above it, except for the data from 3 or 4 cells in the row (can i insert some type of "except" function?)
  2. All validation from the row above must be copied into the new row.
  3. If "NO" is clicked, i simply want to gray-out a box in the same row, right next to the column with the buttons, and remove the option to use the validation contained therein.
Can someone help me with this? I have an awesome excel template that will do EVERYTHING I need it to, but am very much a beginner with Macros. I would VERY much appreciate someones help with this. Thanks!
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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