Ako hoces da ti bude BOLD+Crveno onda bi VBA kod mogao da izgleda ovako:
Code:
Sub Duplikat()
Dim Br1 As Range, Br2 As Range
Dim i As Integer
Set rg1 = Range("A1:A10")
Set rg2 = Range("B1:B10")
For Each Br1 In rg1
For Each Br2 In rg2
If Br1.Value = Br2.Value And (Br2.Font.Bold = False) Then
Br1.Font.Bold = True
Br1.Font.Color = RGB(256, 0, 0)
Br2.Font.Bold = True
Br2.Font.Color = RGB(256, 0, 0)
i = i + 1
Exit For
End If
Next 'Br2
Next 'Br1
MsgBox "Postoji " & i & " parova.", vbInformation + vbOKOnly, "Parovi"
End Sub