J
jess01
Guest
Bonjour
En cherchant sur les pages , j ai trouvé une application , qui fonctionnerais bien pour mon tableau , le hic c est que je ne comprend pas du tout ce langage ,.l application me donne les chiffres 1 2 3 classés exemple 11223 , mais j ai besoin que cela aille plus loin , c est a dire rajouter les 4 5 .
quelqu un peut il me dire ce qui faut changer ou rajouter
merci bonnne journée
voici le code
Sub Bouton2_QuandClic()
Dim c As Range
Dim tablo()
Dim x As Byte, i As Byte, j As Byte
Dim temp As Byte
For Each c In Range('aa7:aa' & Range('aa65536').End(xlUp).Row)
x = 1
ReDim tablo(1 To x)
For i = 0 To 4
Select Case c.Offset(0, i)
Case 1, 2, 3
ReDim Preserve tablo(1 To x)
tablo(x) = c.Offset(0, i)
x = x + 1
End Select
Next i
For i = 1 To UBound(tablo)
For j = 1 To UBound(tablo)
If tablo(i) < tablo(j) Then
temp = tablo(i)
tablo(i) = tablo(j)
tablo(j) = temp
End If
Next j
Next i
c.Offset(0, 15) = Join(tablo, '')
Erase tablo
Next c
End Sub
En cherchant sur les pages , j ai trouvé une application , qui fonctionnerais bien pour mon tableau , le hic c est que je ne comprend pas du tout ce langage ,.l application me donne les chiffres 1 2 3 classés exemple 11223 , mais j ai besoin que cela aille plus loin , c est a dire rajouter les 4 5 .
quelqu un peut il me dire ce qui faut changer ou rajouter
merci bonnne journée
voici le code
Sub Bouton2_QuandClic()
Dim c As Range
Dim tablo()
Dim x As Byte, i As Byte, j As Byte
Dim temp As Byte
For Each c In Range('aa7:aa' & Range('aa65536').End(xlUp).Row)
x = 1
ReDim tablo(1 To x)
For i = 0 To 4
Select Case c.Offset(0, i)
Case 1, 2, 3
ReDim Preserve tablo(1 To x)
tablo(x) = c.Offset(0, i)
x = x + 1
End Select
Next i
For i = 1 To UBound(tablo)
For j = 1 To UBound(tablo)
If tablo(i) < tablo(j) Then
temp = tablo(i)
tablo(i) = tablo(j)
tablo(j) = temp
End If
Next j
Next i
c.Offset(0, 15) = Join(tablo, '')
Erase tablo
Next c
End Sub