Sub MatchAndUpdate()
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
.EnableEvents = False
End With
R = Sheets("Source").Range("A" & Rows.Count).End(xlUp).Row
For a = 1 To R
q = Sheets("Source").Cells(a, 12).Text
RR = Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row
For aa = 1 To RR
If Not IsError(Sheets("Sheet1").Cells(aa, 12)) Then
If Sheets("Sheet1").Cells(aa, 12).Text = q Then
x = Sheets("Sheet1").Cells(aa, 9).Text
xx = Sheets("Source").Cells(a, 9).Text
If x = xx Then GoTo nextaa
If Mid$(xx, 1, Len(x)) = x Then
Sheets("Sheet1").Cells(aa, 9) = Sheets("Source").Cells(a, 9)
Sheets("Sheet1").Cells(aa, 9).Interior.ColorIndex = 6
End If
End If
End If
nextaa:
Next aa
Next a
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
.EnableEvents = True
End With
End Sub