I recorded the following Macro to copy Data to a Database Sheet, but cannot get it to find the next empty row. When I run the macro it will paste to whatever row the cursor is in. I would like to have the data copied to the next empty row starting with column "A2". Also (this may need another thread) I would like a formula in Column A to automatically record a new number with each new entry, starting with say 0001.
Thanks,
Jim O
Sub AddToDataBase()
'
' AddToDataBase Macro
' Macro recorded 7/14/2009 by Jim Ogier
'
'
Range("AK2:AK21").Select
Selection.Copy
Sheets("Customer Data Base").Select
'Find next empty row
n = Sheets("Customer Data Base").Range("A65536").End(xlUp).Row + 1
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
End Sub
Bookmarks