Copy cell contents to another worksheet

N

ndavies

I need to copy the data in three cells from the first worksheet to th
next available line on worksheet 2. I've kindly been given some code b
one user that works fine but for one cell only.

example:
I enter the following into ROW2 of SHEET1 -

A B C
D
1 NAME AGE COUNTRY D.O.B
2 J Smith 12 UK
02/08/70

I want the data in A2, B2 and D2 only, to appear in the first empty ro
on SHEET2.

SHEET2 should now look like this:

A B C
D
1 J Smith 12 02/08/70

The next time I enter new data into ROW2 on SHEET1 I want the sam
cells with the new data to be copied to next available row on SHEET2.

Example:
A B C
D
1 NAME AGE COUNTRY D.O.B
2 N Davies 33 UK
12/05/45

SHEET2 should now look like this:

A B C
D
1 J Smith 12 02/08/70
2 N Davies 33 12/05/45


I would be really grateful if someone could help me with this.

Thanks in advance.
Nige
 
T

Tom Ogilvy

Sub Tester1()
Worksheets("Sheet1").Range("A2").Range("A1,B1,D1").Copy _
Destination:=Worksheets("Sheet2").Cells(Rows.Count, 1).End(xlUp)(2)

End Sub

worked for me. (I had to execute the macro - but I assume that is what you
want).
 
N

ndavies

Tom,

Youv'e made my day.....Works as I want it to!

Sorry about the formatting of examples, looked good when creating th
post. Would have thought that it would hinder a response more tha
anything!

Extremely grateful.

Nige
 

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