auto populate unused rows from workbook to workbook

J

JG

Please Help. I can't seem to get the data entered on one workbook to enter on
another workbook without over writing. I've set up a master seed file where
client data is entered and then saved as the client name. Its data entered
into rows is then set to auto populate the second workbook's first row. Is
there a method by which a second set of data will automatically know to skip
down to the next unused row on the second workbook? Anybody?
Thanks!
 
J

JLatham

It would be a lot easier if we could see the code you're using now that does
the overwriting.

The basics of it all are:
set a reference to the second workbook,
set a reference to the worksheet in the second workbook
then determine next available row on that sheet.

Would look a little like this inside of some Sub code module:

Dim otherWB As Workbook
Dim otherWS as Worksheet
Dim nextAvailableRow As Long

Set otherWB = Workbooks("OtherWorkbookName.xls")
Set otherWS = otherWB.Worksheets("Other Sheet Name")
'assuming column A on the other sheet always has some info in it
lastRow = otherWS.Range("A" & Rows.Count).End(xlup).Row + 1

'now you can paste the data to be copied into otherWS.Range("A" & lastRow)

If you can't get it working from these pointers, post back with the code
you've got now and we'll try to get it going for you. BTW: the code above
will never use row 1 on the 'other sheet', it will start at row 2 even on a
clean "other sheet".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top