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
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