Newbie struggling - trying to update one sheet from another

G

Graeme

Hi

For coursework I have to create an excel workbook that takes totals from
invoices and adds them all up - pretty simple for some but not me!

I have created the invoice template and the user enters the necessary data
to complete and print it out - what I need is a way of taking four or five
sets of data from that invoice sheet (e.g. invoice number, customer name etc
etc) and writing them to another sheet so that I can add them up.
The problem I am having is how to get that data into the next blank row in
the second sheet - currently it only overwrites the first set - how do I get
the pointer to increment by one row each time the invoice sheet is saved??

Graeme
 
B

Bernie Deitrick

Graeme,

A macro will do it, along the lines of

Sub MoveValues()
'From Sheet1 Cell D4 to bottom of Sheet2 column B:
Worksheets("Sheet2").Range("B65536").End(xlUp(2).Value = _
Worksheets("Sheet1").Range("D4").Value
End Sub

Modify for your needs, and repeat that one line as many times as
needed.

HTH,
Bernie
MS Excel MVP
 
B

Bernie Deitrick

Ooops, forgot a closing paren:

Worksheets("Sheet2").Range("B65536").End(xlUp)(2).Value = _
Worksheets("Sheet1").Range("D4").Value

HTH,
Bernie
MS Excel MVP
 

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