View Single Post
 
Old 07-25-2018, 12:31 PM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Code:
Sub GetCompleted()
 
    Dim lastrow As Long
    Dim range1 As Range, range2 As Range
    Dim src As Workbook, dest As Workbook

Set src = Workbooks("SearchResultsCompleted " & Format(Date, "m.d.yy") & ".xls")
Set dest = Workbooks("Weekly Plan Status " & Format(Date, "m.d.yy") & ".xlsm")

With src.Sheets("Archer Search Report")
    lastrow = .Cells.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
    Set range1 = .Range("A2:G" & lastrow)
    Set range2 = .Range("H2:L" & lastrow)
End With

With dest.Sheets("Completed")
    .Range("A2:G" & lastrow).Value = range1.Value
    .Range("I2:M" & lastrow).Value = range2.Value
    .Range("H2").FormulaR1C1 = "=RC[-2]-RC[-3]"
    .Range("H2").AutoFill Destination:=Range("H2:H" & lastrow)
End With
 
End Sub
Reply With Quote