Classement de données en VBA
Résolu/Fermé
Cedric_hess
Messages postés
28
Date d'inscription
mercredi 30 mars 2016
Statut
Membre
Dernière intervention
24 mai 2016
-
23 mai 2016 à 11:37
Cedric_hess Messages postés 28 Date d'inscription mercredi 30 mars 2016 Statut Membre Dernière intervention 24 mai 2016 - 23 mai 2016 à 13:27
Cedric_hess Messages postés 28 Date d'inscription mercredi 30 mars 2016 Statut Membre Dernière intervention 24 mai 2016 - 23 mai 2016 à 13:27
A voir également:
- Classement de données en VBA
- Erreur 1004 vba ✓ - Forum VB / VBA
- Bp classement foot ✓ - Forum Loisirs / Divertissements
- Find vba - Astuces et Solutions
- Vba range avec variable ✓ - Forum VB / VBA
- Logiciel classement photo - Guide
1 réponse
Cedric_hess
Messages postés
28
Date d'inscription
mercredi 30 mars 2016
Statut
Membre
Dernière intervention
24 mai 2016
23 mai 2016 à 13:27
23 mai 2016 à 13:27
Rebonjour a tous
si quelqu'un est interessé par la solution enfaite fallait just changer l'ordre et voila le code qui marche :
si quelqu'un est interessé par la solution enfaite fallait just changer l'ordre et voila le code qui marche :
Sub rank()
Dim i As Integer
Cells(2, 5) = 1
For i = 2 To WorksheetFunction.CountA(Columns(4))
If Cells(i, 4).Value = Cells(i + 1, 4).Value Then
Cells(i+1, 5).Value = Cells(i, 5).Value
Else: Cells(i+1, 5).Value = Cells(i, 5).Value + 1
End If
Next i
End Sub