[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 120
  • Last Modified:

Transfer data code

Hi,

I have data in a tab called "Change Summary" and i want to transfer it to a tab called "Log", both tabs have headings so, il need it from "A2-end of rows" transferred to "Log" But in log it must append, so paste to next available row

Thanks
0
Seamus2626
Asked:
Seamus2626
  • 4
  • 2
1 Solution
 
Rgonzo1971Commented:
Hi,

pls try

Sub macro()

Sheets("Change Summary").Range(Range("A2"), Range("A" & Rows.Count).End(xlUp)).Copy _
    Sheets("Log").Range("A" & Rows.Count).End(xlUp).Offset(1)
End Sub
' Or

Sub macro()

Sheets("Change Summary").Range(Range("A2"), Range("A" & Rows.Count).End(xlUp)).Cut _
    Sheets("Log").Range("A" & Rows.Count).End(xlUp).Offset(1)
End Sub

Regards
0
 
Seamus2626Author Commented:
Thanks Rgonzo, the code only transfers column A, can you get it to transfer A:L from Change Summary

Thanks
0
 
Rgonzo1971Commented:
then try

Sub macro()

Sheets("Change Summary").Range(Range("A2"), Range("L" & Rows.Count).End(xlUp)).Copy _
    Sheets("Log").Range("A" & Rows.Count).End(xlUp).Offset(1)
End Sub
' Or

Sub macro()

Sheets("Change Summary").Range(Range("A2"), Range("L" & Rows.Count).End(xlUp)).Cut _
    Sheets("Log").Range("A" & Rows.Count).End(xlUp).Offset(1)
End Sub
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Seamus2626Author Commented:
Thanks!
0
 
Seamus2626Author Commented:
Rgonzo, im getting an application defined error when attempting to use this code now,

my entire sub is below, do you know what the error is?

Thanks

Sub ClearChangeSummary()

'When the targets have been uploaded to CV, the admin will use this button to clear out uploaded amendments/additions




Application.ScreenUpdating = False
Sheets("Change Summary").Select

Dim Lastrow As Integer


Sheets("Change Summary").Select
If Range("A2").Value <> "" Then

    Sheets("Log").Select
    ActiveWorkbook.Unprotect Password:="football"
    Sheets("Change Summary").Range(Range("A2"), Range("L" & Rows.Count).End(xlUp)).Cut _
    Sheets("Log").Range("A" & Rows.Count).End(xlUp).Offset(1)

    
End If




Lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row

Range("A2:L2" & Lastrow).ClearContents

    Sheets("Log").Select
    ActiveSheet.Protect Password:="football"


Sheets("Admin").Select


Application.ScreenUpdating = True

End Sub

Open in new window

0
 
Seamus2626Author Commented:
All sorted, just needed to jump onto the sheet!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now