jokerfidelio
XLDnaute Occasionnel
Bonjour a tous,
j'aurais besoin de votre aide pour modifier un code VBA concernant une recherche.
je n'arrive pas a adapter celui ci pour que la recherche soit sur les colonne 3 , 6 et 9
ici :
If Cells(ligne, 1) Like "*" & TextBox1 & "*" Then
Cells(ligne, 1).Interior.ColorIndex = 43
ListBox1.AddItem Cells(ligne, 1)
idem pour Range("A2:A24") il faudrait que je puisse ajouter en plus : de C3 a C24 de F3 a F24 et de I3 a I24
Voici le code :
Option Compare Text
Private Sub TextBox1_Change()
Application.ScreenUpdating = False
Range("A2:A24").Interior.ColorIndex = 2
ListBox1.Clear
If TextBox1 <> "" Then
For ligne = 2 To 24
If Cells(ligne, 1) Like "*" & TextBox1 & "*" Then
Cells(ligne, 1).Interior.ColorIndex = 43
ListBox1.AddItem Cells(ligne, 1)
End If
Next
End If
End Sub
merci d'avance pour votre aide, si précieuse...
j'aurais besoin de votre aide pour modifier un code VBA concernant une recherche.
je n'arrive pas a adapter celui ci pour que la recherche soit sur les colonne 3 , 6 et 9
ici :
If Cells(ligne, 1) Like "*" & TextBox1 & "*" Then
Cells(ligne, 1).Interior.ColorIndex = 43
ListBox1.AddItem Cells(ligne, 1)
idem pour Range("A2:A24") il faudrait que je puisse ajouter en plus : de C3 a C24 de F3 a F24 et de I3 a I24
Voici le code :
Option Compare Text
Private Sub TextBox1_Change()
Application.ScreenUpdating = False
Range("A2:A24").Interior.ColorIndex = 2
ListBox1.Clear
If TextBox1 <> "" Then
For ligne = 2 To 24
If Cells(ligne, 1) Like "*" & TextBox1 & "*" Then
Cells(ligne, 1).Interior.ColorIndex = 43
ListBox1.AddItem Cells(ligne, 1)
End If
Next
End If
End Sub
merci d'avance pour votre aide, si précieuse...
Dernière édition: