ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy cell contents to another worksheet (https://www.excelbanter.com/excel-programming/301985-copy-cell-contents-another-worksheet.html)

ndavies

Copy cell contents to another worksheet
 
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

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

Copy cell contents to another worksheet
 
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).

--
Regards,
Tom Ogilvy


"ndavies " wrote in message
...
I need to copy the data in three cells from the first worksheet to the
next available line on worksheet 2. I've kindly been given some code by
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 row
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 same
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.
Nigel


---
Message posted from http://www.ExcelForum.com/




ndavies[_2_]

Copy cell contents to another worksheet
 
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

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 05:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com