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 27 28 29 30 31
| Option Compare Text
Dim Lig As Long, Col As Long
Dim Nom_Disj As String
Sub ComboBox1_Change()
Application.ScreenUpdating = False
Nom_Disj = ComboBox1.Text
Col = 3
Deb_Recherche:
For Lig = 4 To 38
If InStr(1, Cells(Lig, Col), Nom_Disj, 1) <> 0 Then
Cells(Lig, Col).Interior.Color = RGB(0, 255, 192)
Else: Cells(Lig, Col).Interior.Color = RGB(255, 255, 255)
End If
If Lig = 38 Then
Select Case Col
Case 3
Col = 8
GoTo Deb_Recherche
Case 8
Col = 18
GoTo Deb_Recherche
Case 18
Col = 23
GoTo Deb_Recherche
End Select
End If
Next Lig
End Sub |
Partager