Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy data input to archive
Hi
I would like to copy data input rows from sheet InputData to another sheet called Archive. The data is from rows 2 onwards (row 1 is header info). On the archive sheet the data should get appended to the first blank row. Can someone help me with a macro for this? thanks James |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy data input to archive
With Sheets("Archive")
ArchLastRow = .Range("A" & Rows.Count).End(xlUp).Row End With With Sheets("InputData") InLastRow = .Range("A" & Rows.Count).End(xlUp).Row .Rows("2:" & InLastRow).Copy _ Destination:=Sheets("Sheet2").Rows(ArchLastRow + 1) End With "access user" wrote: Hi I would like to copy data input rows from sheet InputData to another sheet called Archive. The data is from rows 2 onwards (row 1 is header info). On the archive sheet the data should get appended to the first blank row. Can someone help me with a macro for this? thanks James |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy data input to archive
I had sheet2 instead of Archive in one place in the code
With Sheets("Archive") ArchLastRow = .Range("A" & Rows.Count).End(xlUp).Row End With With Sheets("InputData") InLastRow = .Range("A" & Rows.Count).End(xlUp).Row .Rows("2:" & InLastRow).Copy _ Destination:=Sheets("Archive").Rows(ArchLastRow + 1) End With "access user" wrote: Hi I would like to copy data input rows from sheet InputData to another sheet called Archive. The data is from rows 2 onwards (row 1 is header info). On the archive sheet the data should get appended to the first blank row. Can someone help me with a macro for this? thanks James |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy data input to archive
Hi James,
Have a look at Ron de Bruin's website: http://www.rondebruin.nl/tips.htm. There is a Copy/Paste/Merge examples section. hth dan |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy data input to archive
Joel
Thanks for that. Additionally, I forgot to mention, I wanted to erase the data (that's copied to the archive sheet) from the input sheet. So that after each transfer of data to the archive sheet, the range ont the input sheet where the data was copied from is cleared. Is that quite easy to do programmatically? tia James "Joel" wrote: I had sheet2 instead of Archive in one place in the code With Sheets("Archive") ArchLastRow = .Range("A" & Rows.Count).End(xlUp).Row End With With Sheets("InputData") InLastRow = .Range("A" & Rows.Count).End(xlUp).Row .Rows("2:" & InLastRow).Copy _ Destination:=Sheets("Archive").Rows(ArchLastRow + 1) End With "access user" wrote: Hi I would like to copy data input rows from sheet InputData to another sheet called Archive. The data is from rows 2 onwards (row 1 is header info). On the archive sheet the data should get appended to the first blank row. Can someone help me with a macro for this? thanks James |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy data input to archive
What is "ArchLastRow" out of interest? How does excel know what it is?
"Joel" wrote: I had sheet2 instead of Archive in one place in the code With Sheets("Archive") ArchLastRow = .Range("A" & Rows.Count).End(xlUp).Row End With With Sheets("InputData") InLastRow = .Range("A" & Rows.Count).End(xlUp).Row .Rows("2:" & InLastRow).Copy _ Destination:=Sheets("Archive").Rows(ArchLastRow + 1) End With "access user" wrote: Hi I would like to copy data input rows from sheet InputData to another sheet called Archive. The data is from rows 2 onwards (row 1 is header info). On the archive sheet the data should get appended to the first blank row. Can someone help me with a macro for this? thanks James |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Archive Data with Excel files | Excel Discussion (Misc queries) | |||
input or copy data | Excel Worksheet Functions | |||
How to avoid a copy of an unprotected archive? | Setting up and Configuration of Excel | |||
Copy cell data from workbook based on user input | Excel Programming | |||
Copy & Paste to an Archive | Excel Programming |