Need help creating macro to add & remove lines on multiple sheets

gheffron

New Member
Joined
Sep 29, 2011
Messages
1
Hello,
I am new to the board but have been reading it for a couple of weeks as I build my spreadsheet. So far, the info I have found has been extremely helpful but I have run into a bit of a roadblock.

I was hoping someone could help me create a macro to add and remove lines within a spreadsheet my office uses. Thanks for your help in advance!

To help illustrate my request, I have included a google doc link of a portion of the spreadsheet that can be used as ref.

Essentially, for each section of budget items on "sheet2" I would like to be able to add/delete rows either below a selected row/cell in that section or if no row/cell in that section is selected a new row would be added at the bottom of that section. I would like the the new row to have all of the formulas and formats of the selected row but no data

For example, on "sheet2" If I want to add a row below 'row 7' I would select 'row 7' or a cell in that row (ie: 7A) and press the "+" button, if I wanted to add a row at the bottom of this section (under 'row 9') I would select a cell or row outside of this section (Section A is considered rows 4:12) and press the "+' button.

For removing a row, i would like to select the row I desire to remove and click the "-" button to remove that row.

In addition to this, the row added or removed on "sheet2" would need to be reflected on another sheet ("sheet1"). The rows/columns are not the same as they are in Sheet2 though. For example if I add a row on "Sheet2" under "row 7" it would then need to show up on "Sheet1" as appearing under "row 4".

Sorry for the long winded explanation but I wanted to try and make my request as clear as possible. Thanks in advance for your help!
Greg


https://docs.google.com/spreadsheet/ccc?key=0AtQCcBUHMBoNdHVrQWlGTmhXWnh4cVFpRTZFSDFaeVE&hl=en_US
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,224,590
Messages
6,179,763
Members
452,940
Latest member
rootytrip

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