|
- Sub biaoji()
- Dim i As Integer
- Dim j As Integer
- Range("B2:B65535").Interior.ColorIndex = xlNone
- For i = 2 To Cells(65535, 3).End(xlUp).Row
- If Cells(i, 2) <> Cells(i, 3) Then
- j = j + 1
- Cells(i, 2).Interior.ColorIndex = 3
- End If
- Next
- MsgBox "共有" & Cells(65535, 3).End(xlUp).Row - 1 & "条记录,其中" & j & "条记录不符"
- End Sub
复制代码 看看是不是你想要的结果 |
|