PC Review


Reply
Thread Tools Rate Thread

copy data input to archive

 
 
access user
Guest
Posts: n/a
 
      3rd Mar 2008
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 With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      3rd Mar 2008
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

 
Reply With Quote
 
Joel
Guest
Posts: n/a
 
      3rd Mar 2008
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 With Quote
 
dan dungan
Guest
Posts: n/a
 
      3rd Mar 2008
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
 
Reply With Quote
 
access user
Guest
Posts: n/a
 
      4th Mar 2008
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

 
Reply With Quote
 
access user
Guest
Posts: n/a
 
      4th Mar 2008
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
New row after server data input and copy forumla. =?Utf-8?B?TmF0ZSBILg==?= Microsoft Excel Discussion 2 25th May 2007 01:40 AM
input or copy data lawdoggy Microsoft Excel Worksheet Functions 3 3rd Aug 2006 04:12 PM
Copy cell data from workbook based on user input =?Utf-8?B?TWljaGFlbCBB?= Microsoft Excel Programming 7 31st Dec 2005 03:07 PM
can I input sections of survey data results into tables that allow me to copy same responces along same column francesca.campagnoli@gmail.com Microsoft Access 2 13th Dec 2005 07:16 PM
Archive overwrites, not appends, to earlier archive data Bern Microsoft Outlook 0 21st Apr 2004 09:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:05 AM.