求助,如何设定附件中表一和表二中A列和B列中某行的数值完全同时相等时,表一中该行的数值红色显示。 作者: GGMM 时间: 2017-5-17 17:14
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 作者: pureshadow 时间: 2017-5-17 17:25
在条件格式里使用公式