第2个回答 2009-02-13
alt+F11,调出VB编辑器,执行下面的宏
Sub abc()
Dim i, k
i = 1
k = 0
Do While (Excel.Cells(i, 5) <> "" And Excel.Cells(i, 6) <> "")
If Excel.Cells(i, 5) = Excel.Cells(i, 6) Then
k = k + 1
Else:
k = 0
End If
If k = 5 Then
Range(Cells(i - 4, 5), Cells(i, 6)).Select
Selection.Font.ColorIndex = 3
End If
If k > 5 Then
Range(Cells(i, 5), Cells(i, 6)).Select
Selection.Font.ColorIndex = 3
End If
i = i + 1
Loop
End Sub本回答被提问者采纳
第4个回答 2009-02-12
=AND(F2=G2,F3=G3,F4=G4,F5=G5,F6=G6)
用条件格式,填上面的公式,设格式