Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 411
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Archive Data with Excel files hmm Excel Discussion (Misc queries) 4 June 25th 07 10:39 PM
input or copy data lawdoggy Excel Worksheet Functions 3 August 3rd 06 04:12 PM
How to avoid a copy of an unprotected archive? SantistaS Setting up and Configuration of Excel 4 February 21st 06 03:11 PM
Copy cell data from workbook based on user input Michael A Excel Programming 7 December 31st 05 03:07 PM
Copy & Paste to an Archive Donnie Stone Excel Programming 1 September 18th 03 03:14 AM


All times are GMT +1. The time now is 07:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"