![]() |
|
Forum
|
|
|
#16 (permalink) |
|
XLDnaute Accro
Date d'inscription: septembre 2007
Messages: 1 436
|
Bonjour,
Avec la fonction matricielle SansDoublonsTrié(), le temps de réponse est correct. Function SansDoublonsTrié(champ As Range) Set MonDico = CreateObject("Scripting.Dictionary") temp = champ For i = 1 To UBound(temp, 1) If Not MonDico.Exists(temp(i, 1)) And temp(i, 1) <> 0 Then MonDico.Add temp(i, 1), temp(i, 1) End If Next i a = MonDico.items j = UBound(a) Call tri(a, 0, j) SansDoublonsTrié = Application.Transpose(a) End Function Sub tri(a, gauc, droi) ' Quick sort ref = a((gauc + droi) \ 2) g = gauc: d = droi Do Do While a(g) < ref: g = g + 1: Loop Do While ref < a(d): d = d - 1: Loop If g <= d Then temp = a(g): a(g) = a(d): a(d) = temp g = g + 1: d = d - 1 End If Loop While g <= d If g < droi Then Call tri(a, g, droi) If gauc < d Then Call tri(a, gauc, d) End Sub JB |
|
|
|
| ANNONCES | |||
|
|
|
|
#17 (permalink) |
|
XLDnaute Nouveau
Date d'inscription: janvier 2008
Messages: 17
|
Peut etre que pour toi le delai est raisonnable mais dans mon cas, j ai enormement de donnée
j'aimerai juste que la suppression des doublons et le tri ne se face que lorsque je clique sur un bouton de commande est ce possible? |
|
|
|
![]() |
| Liens sociaux |
| Outils de la discussion | |
|
|
Discussions similaires
|
||||
| Discussion | Auteur | Forum | Réponses | Dernier message |
| ordre alphabetique vba | debo | Forum Excel | 1 | 16/06/2006 16h24 |
| ordre alphabetique en VBA | DDC | Forum Excel Downloads - Archives | 1 | 17/06/2004 01h32 |
| ordre alphabetique | DDC | Forum Excel Downloads - Archives | 4 | 16/06/2004 10h11 |
| ordre alphabétique | petchy | Forum Excel Downloads - Archives | 4 | 21/05/2004 18h05 |
| tri par ordre alphabétique | Piffard | Forum Excel Downloads - Archives | 1 | 12/03/2004 01h51 |