There may be a more efficient way to do it but this was off the top of my head:
Sub Job_Labor_Type()
Dim ws1 As Worksheet: Set ws1 = Sheets("Sheet1")
Dim ws2 As Worksheet: Set ws2 = Sheets("Sheet2")
Dim v1 As Variant, v2 As Variant
Dim r1 As Range, r2 As Range
Dim i As Long
For i = 2 To ws1.Range("A" & Rows.Count).End(xlUp).Row
If Not Len(ws1.Range("A" & i).Value) = 0 And InStr(1, ws1.Range("A" & i).Value, "Employee") = 0 Then
If Not Len(ws1.Range("B" & i).Value) = 0 Then
v1 = Split(ws1.Range("B" & i).Value, "/")
v2 = Split(ws1.Range("C" & i).Value, "/")
Set r1 = ws2.Range("A1:A" & ws2.Range("A" & Rows.Count).End(xlUp).Row).Find(v1(0), , xlValues, xlWhole)
If Not r1 Is Nothing Then
Set r2 = ws2.Range("B" & r1.Row, "B" & ws2.Range("B" & Rows.Count).End(xlUp).Row).Find(CStr(v2(1)))
If Not r2 Is Nothing Then
If ws1.Range("D" & i).Value <> ws2.Range("C" & r2.Row).Value Then
ws1.Range("D" & i).Font.Color = vbRed
ws1.Range("F" & i).Value = "ERROR"
ws1.Range("F" & i).Font.Color = vbRed
End If
End If
End If
End If
End If
Next i
End Sub
Bookmarks