Insert a new line

just1joe

Board Regular
Joined
Apr 15, 2003
Messages
79
I'm not sure how to do this in a macro. I have a sheet of data which contains columns for names, items and amounts. I would like to insert a row above the Row 2 and then insert rows each time the name changes. In the inserted row I would like a new column to increment a number for each inserted row, 1, 2, 3 etc. In this inserted row I also need the amount to be summed up for just the amounts listed below until the next inserted row.

- Joseph
excel 2000.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Look into doing subtotals. Data-Subtotals.

This functionality is built into Excel.

Hope this helps!
 
Upvote 0
Thanks,

I was trying to use the data grouping and I wasn't working for me. I've never used the other thanks.
 
Upvote 0

Forum statistics

Threads
1,221,701
Messages
6,161,381
Members
451,700
Latest member
Eccymarge

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