TextBox recherche valeur dans colonne
Résolu/Fermé
lanxade
Messages postés
29
Date d'inscription
jeudi 30 avril 2009
Statut
Membre
Dernière intervention
8 avril 2023
-
3 août 2009 à 14:25
lanxade Messages postés 29 Date d'inscription jeudi 30 avril 2009 Statut Membre Dernière intervention 8 avril 2023 - 3 août 2009 à 15:50
lanxade Messages postés 29 Date d'inscription jeudi 30 avril 2009 Statut Membre Dernière intervention 8 avril 2023 - 3 août 2009 à 15:50
A voir également:
- TextBox recherche valeur dans colonne
- Déplacer une colonne excel - Guide
- Recherche musique - Guide
- Colonne word - Guide
- Google recherche par image - Guide
- Additionner colonne excel - Guide
2 réponses
pijaku
Messages postés
12263
Date d'inscription
jeudi 15 mai 2008
Statut
Modérateur
Dernière intervention
4 janvier 2024
2 744
3 août 2009 à 15:14
3 août 2009 à 15:14
Salut,
Ceci devrait te convenir. A adapter bien sur
Dim i As Integer, numlign As Integer
numlign = Sheets("Feuil1").Range("B65536").End(xlUp).Row
With Sheets("Feuil1")
For i = 1 To numlign
If .Cells(i, 2).Value = TextBox4 Then
.Cells(i, 2).Offset(0, 1).Value = .Cells(i, 2).Offset(0, 1).Value + TextBox6
Exit For
End If
Next
End With
Edit : j'ai zappé la partie ou il faut ajouter la valeur du TextBox4. Je m'y mets tout de suite...
Ceci devrait te convenir. A adapter bien sur
Dim i As Integer, numlign As Integer
numlign = Sheets("Feuil1").Range("B65536").End(xlUp).Row
With Sheets("Feuil1")
For i = 1 To numlign
If .Cells(i, 2).Value = TextBox4 Then
.Cells(i, 2).Offset(0, 1).Value = .Cells(i, 2).Offset(0, 1).Value + TextBox6
Exit For
End If
Next
End With
Edit : j'ai zappé la partie ou il faut ajouter la valeur du TextBox4. Je m'y mets tout de suite...
pijaku
Messages postés
12263
Date d'inscription
jeudi 15 mai 2008
Statut
Modérateur
Dernière intervention
4 janvier 2024
2 744
3 août 2009 à 15:47
3 août 2009 à 15:47
Essaye comme ceci :
Dim i As Integer, numlign As Integer
numlign = Sheets("Feuil1").Range("B65536").End(xlUp).Row
With Sheets("Feuil1")
For i = 1 To numlign
If .Cells(i, 2).Value = TextBox4 Then
.Cells(i, 2).Offset(0, 1).Value = .Cells(i, 2).Offset(0, 1).Value + TextBox6
Exit For
End If
Next
If .Cells(i, 2).Value = "" Then
.Cells(i, 1).Value = TextBox2
.Cells(i, 2).Value = TextBox4
.Cells(i, 3).Value = TextBox6
End If
End With
Dim i As Integer, numlign As Integer
numlign = Sheets("Feuil1").Range("B65536").End(xlUp).Row
With Sheets("Feuil1")
For i = 1 To numlign
If .Cells(i, 2).Value = TextBox4 Then
.Cells(i, 2).Offset(0, 1).Value = .Cells(i, 2).Offset(0, 1).Value + TextBox6
Exit For
End If
Next
If .Cells(i, 2).Value = "" Then
.Cells(i, 1).Value = TextBox2
.Cells(i, 2).Value = TextBox4
.Cells(i, 3).Value = TextBox6
End If
End With
lanxade
Messages postés
29
Date d'inscription
jeudi 30 avril 2009
Statut
Membre
Dernière intervention
8 avril 2023
3 août 2009 à 15:50
3 août 2009 à 15:50
Bonjour PIJAKU,
En effet bien adapté ça marche
A bientôt
En effet bien adapté ça marche
A bientôt