seriousdamage
Board Regular
- Joined
- Aug 14, 2005
- Messages
- 58
Hi, I have recorded the below macro, to copy some cells and paste them in a different sheet,
unfortunately every time I run the macro, it keeps copying in the same spot and overwrites what was there before instead of searching for the next available row.
Can anyone help?
Thanks
Nic
unfortunately every time I run the macro, it keeps copying in the same spot and overwrites what was there before instead of searching for the next available row.
Can anyone help?
Thanks
Nic
Code:
Sub enterdata()
'
' enterdata Macro
' Macro recorded 9/22/2006 by Cisco Systems, Inc.
'
'
Sheets("Form").Select
Range("A7:D7").Select
Selection.Copy
Sheets("Database").Select
ActiveCell.SpecialCells(xlLastCell).Select
Range("A2").Select
ActiveSheet.Paste
Range("E2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(Database!RC[-2],Information!C[-4]:C[-3],2,0)"
Range("F2").Select
ActiveCell.FormulaR1C1 = "=RC[-5]+RC[-4]"
Range("F3").Select
End Sub