Creating a table from one varying source

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello there. I am trying to create one table that updates the relevant details as and when i fill in sheet one (which is a an order form). When the order form is complete i would like sheet 2 to auto fill without overwriting the data that is already there from previous orders. If possible can someone give me some hints for the code 'cos i'm pulling my hair out now,

cheers
 
You could have a button that, when pressed, writes the data the second
sheet. It seems the only problem you might have is finding the bottom of
the data that exists currently.

Private Sub CommandButton1_Click()
Dim sh as Worksheet, rw as Long
' assumes there will be a header row for sheet2
set sh = worksheets("Sheet2")
rw = sh.cells(rows.count,1).End(xlup)(2).Row

with worksheets("Sheet1")
sh.cells(rw,1) = .Range("A5")
sh.Cells(rw,2) = .Range("B9")
sh.Cells(rw,3) = .Range("B10")
End with
End Sub

--
Regards,
Tom Ogilvy

Rumblefish said:
Hello there. I am trying to create one table that updates the relevant
details as and when i fill in sheet one (which is a an order form). When
the order form is complete i would like sheet 2 to auto fill without
overwriting the data that is already there from previous orders. If
possible can someone give me some hints for the code 'cos i'm pulling my
hair out now,
 

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

Back
Top