Sub Crosscheck2()
For i = 5 To Range("F65536").End(xlUp).Row
Cells(i, 3).Value = Trim(Mid(Cells(i, 3).Value, InStr(Cells(i, 3).Value, ":") + 1))
If Left(Cells(i, 6).Value, 5) <> "M0000" Then
If Right(Cells(i, 3).Value, Len(Cells(i, 6).Value)) <> Cells(i, 6) Then
Cells(i, 3).Interior.ColorIndex = 44
End If
Else
If Cells(i, 4).Value = "" Then
Cells(i, 4).Interior.ColorIndex = 44
ElseIf Left(LTrim(Cells(i, 3).Value), Len(Cells(i, 4).Value)) <> Cells(i, 4).Value Then
Cells(i, 3).Interior.ColorIndex = 44
End If
End If
Next
End Sub
|