Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to copy an Excel worksheet with formulas and clear contents. | Excel Discussion (Misc queries) | |||
Formulas to copy contents of one cell in a worksheet to another ce | Excel Discussion (Misc queries) | |||
How can user move in locked worksheet but not copy cell contents? | Excel Worksheet Functions | |||
how to copy cell contents from one workseet to another worksheet? | Excel Discussion (Misc queries) | |||
What worksheet function will formatlessly copy cell contents? | Excel Worksheet Functions |