1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| Dim tableau As Range
Dim i As Integer
Dim maCellule As String
Dim trouve As Boolean
Set tableau = Range(Cells(8, 3), Cells(43, 19))
For i = 2 To 287
trouve = False
Windows("Classeur2").Activate
maCellule = Cells(i, 9)
Windows("Classeur1").Activate
For Each feuille In Worksheets
For Each cell In tableau
If cell.Text = maCellule Then
cell.interior.color=RGB(255,255,0)
If trouve=false then
Windows("Classeur2").Activate
Cells(i, 9).Interior.Color = RGB(255,255, 0)
trouve = True
end if
Exit For
End If
Next cell
Next feuille
Next i |