|
Sub tst()
Dim i As Integer
Dim j As Integer
Dim m As Integer
Dim n As Integer
i = Sheets("表一").Range("a65536").End(xlUp).Row
j = Sheets("表二").Range("a65536").End(xlUp).Row
For m = 2 To i
For n = 2 To j
If Sheet1.Cells(m, 1) & Sheet1.Cells(m, 2) = Sheet2.Cells(n, 1) & Sheet2.Cells(n, 2) Then
Sheet1.Cells(m, 1).Font.ColorIndex = 3
Sheet1.Cells(m, 2).Font.ColorIndex = 3
Sheet1.Cells(m, 3).Font.ColorIndex = 3
Sheet1.Cells(m, 4).Font.ColorIndex = 3
Sheet1.Cells(m, 5).Font.ColorIndex = 3
End If
Next
Next
End Sub
|
|