Morning,
I currently have vba to copy a report from one sheet (Rufus Unal) to another (UTM Unal Cash Report), rather than copying the whole report I would ideally like it to only copy data from the Rufus Unal Sheet that isn’t already on the other sheet as currently it just copies all the data. Column A has unique references in both sheets which is what the criteria would be whether to copy the data or not, also instead of pasting data into row 10 is it possible for it to be pasted underneath the last line of data. Please see current coding below:
Any help would be very much appreciated
Thank you
I currently have vba to copy a report from one sheet (Rufus Unal) to another (UTM Unal Cash Report), rather than copying the whole report I would ideally like it to only copy data from the Rufus Unal Sheet that isn’t already on the other sheet as currently it just copies all the data. Column A has unique references in both sheets which is what the criteria would be whether to copy the data or not, also instead of pasting data into row 10 is it possible for it to be pasted underneath the last line of data. Please see current coding below:
VBA Code:
Sub RunUac()
Dim LR1 As Long
Dim LR2 As Long
Dim LR3 As Long
Dim LR4 As Long
Dim wb1 As Workbook
Dim wb2 As Workbook
Set wb1 = ThisWorkbook
Dim cell As Range
Application.ScreenUpdating = False
Worksheets("Rufus Unal").Visible = True
Workbooks.Open "K:\Finance\Unallocated Cash\Reconciliations\Templates/Rufus_Unal.xlsx", ReadOnly:=True
Workbooks("Rufus_Unal.xlsx").Activate
Sheets("UCRR001x").Activate
LR1 = Cells(Rows.Count, "a").End(xlUp).Row
Range("A2:O" & LR1).Copy
wb1.Activate
Sheets("Rufus Unal").Select
Range("A11").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Workbooks("Rufus_Unal.xlsx").Activate
ActiveWorkbook.Close SaveChanges:=False
Sheets("GL").Select
Range("Sheet16[[#Headers],[Accnt.]]").Select
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
Sheets("Rufus Unal").Select
LR1 = Cells(Rows.Count, "b").End(xlUp).Row
Range("A11:A" & LR1).Copy
Sheets("UTM Unal Cash Report").Select
Range("A10").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Sheets("Rufus Unal").Select
Range("I11:I" & LR1).Copy
Sheets("UTM Unal Cash Report").Select
Range("B10").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Sheets("Rufus Unal").Select
Range("D11:D" & LR1).Copy
Sheets("UTM Unal Cash Report").Select
Range("C10").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Sheets("Rufus Unal").Select
Range("B11:B" & LR1).Copy
Sheets("UTM Unal Cash Report").Select
Range("D10").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Sheets("Rufus Unal").Select
Range("C11:C" & LR1).Copy
Sheets("UTM Unal Cash Report").Select
Range("E10").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Sheets("Sign Off Form").Select
Range("C31").Value = Application.UserName
Application.ScreenUpdating = True
End Sub
Any help would be very much appreciated
Thank you