Overwriting data

C

Cody

I have a macro set up to submit data from an entry point on one worksheet
into a database on the other. Basically, I enter the info on the first
worksheet, hit submit, and it transfers it to the second worksheet. My
question is, how do i make it skip to the next line on the second worksheet
so that it logs all the submits rather then overwriting the previous?

Thanks!
 
B

bpeltzer

This will get you to the cell just below the last populated cell of column A:
Application.Goto Reference:="R65536C1"
Selection.End(xlUp).Select
Selection.Offset(1, 0).Select
(You could get this row into a variable if needed: NextRow = selection.row)
HTH. --Bruce
 
C

Cody

I dont know what this means... how do i enter this in.. or where i guess. I
usually just use the functions... im sorry I am very new to excel, your help
is so very appreciated.
 
B

bpeltzer

You said you had a macro set up; this would go just before the point in the
macro where you begin pasting your data.
 
C

Cody

Thank you, it worked !
--
na


bpeltzer said:
You said you had a macro set up; this would go just before the point in the
macro where you begin pasting your data.
 
D

Dave Peterson

dim NextCell as range
with worksheets("othersheet")
'this uses column A to determine the next available row
set nextcell = .cells(.rows.count,"A").end(xlup).offset(1,0)
end with

'Then your macro does stuff:

destcell.value = "something"
destcell.offset(0,1).value = "something else"

'or...

somernginthecurrentworksheet.copy _
destination:=destcell
 
Top