Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Copy Data from Row 1 to last blank row in next worksheet

I am in need some help I am currently using this macro to copy from cell A1
sheet1 to create a list on sheet2 -

Private Sub Worksheet_Change(ByVal Target As Range)
Dim LastRow As Long, ws As Worksheet

If Not Target.Address = "$A$1" Then Exit Sub

Set ws = Worksheets("sheet2")
LastRow = ws.Cells(Rows.Count, "c").End(xlUp).Row
ws.Range("c" & LastRow + 1).Value = Target.Value

End Sub

Works great for coping one cell. But how can i increase the copy area?

I now need to copy sheet1 cells a1:n1 to the next blank row in sheet2 when
ever sheet1 A1:N1 are changed. I could actaully use N1 as the triger if
needed. Set up is an out side programm will be pasting data to sheet1 A1:N1
for each record, I need to then copy that row of information to create a list
on another worksheet.

Thanks to anyone that can help.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,355
Default Copy Data from Row 1 to last blank row in next worksheet

I think I'd try using

ws.Range("c" & LastRow + 1).EntireRow = Target.EntireRow

--
HTH,
Barb Reinhardt



"MyKeyJ" wrote:

I am in need some help I am currently using this macro to copy from cell A1
sheet1 to create a list on sheet2 -

Private Sub Worksheet_Change(ByVal Target As Range)
Dim LastRow As Long, ws As Worksheet

If Not Target.Address = "$A$1" Then Exit Sub

Set ws = Worksheets("sheet2")
LastRow = ws.Cells(Rows.Count, "c").End(xlUp).Row
ws.Range("c" & LastRow + 1).Value = Target.Value

End Sub

Works great for coping one cell. But how can i increase the copy area?

I now need to copy sheet1 cells a1:n1 to the next blank row in sheet2 when
ever sheet1 A1:N1 are changed. I could actaully use N1 as the triger if
needed. Set up is an out side programm will be pasting data to sheet1 A1:N1
for each record, I need to then copy that row of information to create a list
on another worksheet.

Thanks to anyone that can help.

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
Copy a formula into a blank column only to the last data row Kebbon Excel Worksheet Functions 4 August 16th 07 11:43 PM
copy from B worksheet to A worksheet with NO repeated data tikchye_oldLearner57 Excel Discussion (Misc queries) 1 September 29th 06 06:56 PM
Where are the examples from Help to copy to a blank worksheet? Beanbabeehoohoo Excel Discussion (Misc queries) 1 May 18th 06 10:10 AM
Macro copy and paste = blank worksheet efface Excel Discussion (Misc queries) 1 April 27th 06 09:52 PM
Copy rows of data to another worksheet where ReturnDate is blank Helen McClaine Excel Discussion (Misc queries) 2 March 28th 05 11:33 PM


All times are GMT +1. The time now is 06:44 PM.

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"