Macro Add row

dennisli

Well-known Member
Joined
Feb 20, 2004
Messages
1,070
Sorry I have to detail my question further.

My real question is that in the following attached file, how to create one Macro in Excel to add one row after each row which contains 2004 and copy the format of the row which contains value 2004 to the newly added row? The cell below 2004 should be changed to 2005.

Please be careful that the value below the row contain 2004 is the sum from Prior to 2004. Is possible to change the sum range including 2005?

Thank you very much.

Dennis


Commercial Voluntary

BI PD TOTAL
Prior 0 0 0
1995 0 0 0
1996 0 0 0
1997 0 0 0
1998 0 0 0
1999 0 0 0
2000 0 0 0
2001 0 0 0
2002 0 0 0
2003 0 0 0
2004 0 0 0
0 0 0

Private Passenger Voluntary

BI PD TOTAL
Prior 0 0 0
1995 0 0 0
1996 0 0 0
1997 0 0 0
1998 0 0 0
1999 0 0 0
2000 0 0 0
2001 0 0 0
2002 0 0 0
2003 0 0 0
2004 0 0 0
0 0 0
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,216,076
Messages
6,128,670
Members
449,463
Latest member
Jojomen56

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