Copy Data from Row 1 to last blank row in next worksheet

M

MyKeyJ

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.
 
B

Barb Reinhardt

I think I'd try using

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top