Private Sub CommandButton1_Click()
Dim Flg As Boolean
For i = 1 To [a65536].End(xlUp).Row
For j = 1 To [b65536].End(xlUp).Row
If (Not Trim(Range("A" & CStr(i)).Text) = "") Then
If Trim(Range("A" & CStr(i)).Text) = Trim(Range("B" & CStr(j)).Text) Then
Flg = True
Exit For
Else
Flg = False
End If
End If
Next
If Flg = False Then
Range("A" & CStr(i)).Font.ColorIndex = 3
Else
Range("A" & CStr(i)).Font.ColorIndex = 1
End If
Next
End Sub
浙公网安备 33010602011771号