Listbox2 = .cells(lig1,"F")?
ordinateur!
-
michel_m Messages postés 16602 Date d'inscription Statut Contributeur Dernière intervention -
michel_m Messages postés 16602 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
merci de m aider a résoudre le problème
mot = nom
une fois trouve le nom
ex D3
lis
listbox1 = .cells(lig1,"E")?
listbox2 = .cells(lig1,"F")?
UserForm.ListBox1.Value = .Cells(Lig1, "E")
Private Sub CommandButton1_Click()
Dim Mot, Nbre As Byte, cptr As Byte, Lig1 As Long, lig2 As Integer
Application.ScreenUpdating = False
With Sheets("feuil1")
On Error GoTo saisie
Mot = InputBox("Mot à rechercher ?")
Nbre = Application.CountIf(.Range("D2:D500"), Mot)
If Nbre = 0 Then GoTo vide
Lig1 = Cells.Rows.Count
lig2 = 1
For cptr = 1 To Nbre
Lig1 = .Columns("D").Find(Mot, .Cells(Lig1, "D"), xlValues).Row
UserForm.ListBox1.Value = .Cells(Lig1, "E")
Next
End With
UserForm1.Hide
Exit Sub
merci de m aider a résoudre le problème
mot = nom
une fois trouve le nom
ex D3
lis
listbox1 = .cells(lig1,"E")?
listbox2 = .cells(lig1,"F")?
UserForm.ListBox1.Value = .Cells(Lig1, "E")
Private Sub CommandButton1_Click()
Dim Mot, Nbre As Byte, cptr As Byte, Lig1 As Long, lig2 As Integer
Application.ScreenUpdating = False
With Sheets("feuil1")
On Error GoTo saisie
Mot = InputBox("Mot à rechercher ?")
Nbre = Application.CountIf(.Range("D2:D500"), Mot)
If Nbre = 0 Then GoTo vide
Lig1 = Cells.Rows.Count
lig2 = 1
For cptr = 1 To Nbre
Lig1 = .Columns("D").Find(Mot, .Cells(Lig1, "D"), xlValues).Row
UserForm.ListBox1.Value = .Cells(Lig1, "E")
Next
End With
UserForm1.Hide
Exit Sub
A voir également:
- Listbox2 = .cells(lig1,"F")?
- Sfc /scannow /f /r - Guide
- Chkdsk c /f /r - Guide
- F lux - Télécharger - Divers Utilitaires
- F-prot - Télécharger - Antivirus & Antimalwares
- F engine - Forum Ecran
j'ai un fichier excel
celllule A1=>tata
cellule B1 ==>toto
je lance macro
Lig1 = .Columns("D").Find(Mot, .Cells(Lig1, "D"), xlValues).Row
pour chercher un nom dans la colonne D une fois trouvé
selectionne la ligne
ex D1=popo
dans userform1
ListBox1 = tata
ListBox2 = toto
ListBox13= popo