Here is a macro and 2 files that could help you.
The macro is based on the file's names and sheets' names also. If you have to change this, do not forget to modify the code accordingly.
The macro is in New-file.xlsm workbook. The Old-file.xlsm workbook has no macro in it and only one sheet of data. Both workbooks should be open before running the macro.
You start the macro when you are in the New-file sheet.
Not knowing waht to do with the ADDED or REMOVED jobs, I left them in place but they can also be deleted.
Public Sub Check_Files()
Dim Sh_New As Worksheet, Sh_Old As Worksheet, C_ell As Range, To_Copy As Range, F_ound As Range
Dim Sh_added As Worksheet, Sh_Removed As Worksheet
Set Sh_New = ActiveSheet
Set Sh_Old = Workbooks("Old-File.xlsm").Sheets(1)
'
'Check if Jobs Added sheet exists
On Error Resume Next
Set Sh_added = Sheets("Jobs Added")
On Error GoTo 0
If Sh_added Is Nothing Then
Sheets.Add After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Select
Sheets(Sheets.Count).Name = "Jobs Added"
End If
Set Sh_added = Sheets("Jobs Added")
'Check if Jobs Removed sheet exists
On Error Resume Next
Set Sh_Removed = Sheets("Jobs Removed")
On Error GoTo 0
If Sh_added Is Nothing Then
Sheets.Add After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Select
Sheets(Sheets.Count).Name = "Jobs Removed"
End If
Set Sh_Removed = Sheets("Jobs Removed")
'
'Look for JOBS ADDED
Sh_New.Activate
For Each C_ell In Range("B2", Cells(Rows.Count, 2).End(xlUp))
Set F_ound = Sh_Old.Columns(1).Find(C_ell)
If F_ound Is Nothing Then
If To_Copy Is Nothing Then
Set To_Copy = C_ell.EntireRow
Else
Set To_Copy = Union(To_Copy, C_ell.EntireRow)
End If
End If
Next
If Not To_Copy Is Nothing Then
To_Copy.Copy
Sh_added.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial
End If
Set To_Copy = Nothing
'
'Look for JOBS REMOVED
Sh_Old.Activate
For Each C_ell In Range("A2", Cells(Rows.Count, 1).End(xlUp))
Set F_ound = Sh_New.Columns(2).Find(C_ell)
If F_ound Is Nothing Then
If To_Copy Is Nothing Then
Set To_Copy = C_ell.EntireRow
Else
Set To_Copy = Union(To_Copy, C_ell.EntireRow)
End If
End If
Next
If Not To_Copy Is Nothing Then
To_Copy.Copy
Sh_Removed.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial
End If
End Sub
Hope this helps
Bookmarks