Macro to copy last record and paste as new

Status
Not open for further replies.

dave_dot_hr

New Member
Joined
Oct 14, 2002
Messages
1
I am creating an Excel spreadsheet that I want to be able start with a number and have this number increase by one each time a new record, for lack of a better term, is created. I was trying to use a macro to copy the last record information (example A36:J41) and paste this selection to cells A42:J47 and have the number increase by 1. My macro worked other than it keeps the cells created in the macro. A sample of the macro I created follows;

Sub Macro5()
'
' Macro5 Macro
' Macro recorded 10/9/2002 by mvd
'
' Keyboard Shortcut: Ctrl+n
'
ActiveCell.SpecialCells(xlLastCell).Select
Range("A43:J46").Select
Selection.Copy
Range("A47:J50").Select
ActiveSheet.Paste
End Sub
 
Status
Not open for further replies.

Forum statistics

Threads
1,215,475
Messages
6,125,028
Members
449,205
Latest member
Eggy66

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