OVH Cloud OVH Cloud

Lister et imprimer suivant le résultat d'une colonne

2 réponses
Avatar
Ouille
Salut a toutes et tous,

Dans un classeur j'ai des données dont une colonne qui me sert a identifier un état "Out" ou "In" Colonne O8

Comment lister dans un UserForm certaine données (Colonnes B-D-F-H a partire de la ligne 8) dont l'etat et "Out"

Je vous remercie d'avance, Ouille

2 réponses

Avatar
Ouille
Le forum, bonsoi

J'ai réussi a faire mon test mais en semi automatique, c'est a dire que je sélectione l'un ou l'autre dans un ComboBox

par quel code je pourrais eviter ce ComboBox

Voici le code

Option Explici
Public Ligne1 As Lon
Private Sub BoutSortir_Click(

Unload M

End Su

Private Sub ComboBox1_Change(
Dim i As Intege

If ComboBox1 = "" The

ListBox1.Clea

Exit Su
End I

ListBox1.Clea

With Worksheets("Feuil1"

If .Range("O8") = "" Then Exit Sub 'aucune saisie en Feuil

For i = 1 To .Range("A65536").End(xlUp).Row -
If Left(.Range("O8").Cells(i, 1), Len(ComboBox1)) = ComboBox1 Then ListBox1.AddItem .Range("A8").Cells(i, 1
Next

End Wit
End Su

Private Sub ListBox1_Click(

Dim i As Intege

If UserForm3.ListBox1.ListCount = 0 Then Exit Su

'Parcourir les entrées de liste de la dernière à la premièr
For i = UserForm3.ListBox1.ListCount - 1 To 0 Step -

'Entrée en cour
If UserForm3.ListBox1.Selected(i) The


Ligne1 = ListBox1.ListIndex +
Range("A1").Value = ListBox1.Valu
Range("S7").Selec

Lance

End I
Next

'Unload M
End Su


Private Sub initialize(

Sheets("feuil1").Activat

Range("A7").Selec
Range("F3").Value = "

End Su

Sub Lancer(


'recherche
Cells.Find(What:=Range("A1"), After:¬tiveCell, LookIn:=xlFormulas,
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:úlse).Activat

With ActiveCel
.EntireRow.Selec
TextBox2 = .Offset(0, 0
TextBox3 = .Offset(0, 4
TextBox4 = .Offset(0, 5
TextBox5 = .Offset(0, 15
TextBox6 = .Offset(0, 16
TextBox7 = .Offset(0, 17
TextBox8 = .Offset(0, 18

End Wit

End Su

Private Sub UserForm_Initialize(

ComboBox1.RowSource = "Feuil2!B6:B7

End Su

Merci pour votre aide, Ouille
Avatar
Ouille
Le forum

C'est Bon j'ai trouvé,

Merci, encore, Ouille