Microsoft 365 Impossible to sort a column

moanin

XLDnaute Impliqué
Hi ;)

In a file I have a column with numbers.

Some rows contain few numbers

Ex :

2020

2021

2021

2022

2026

1964-65, 69, 69, 71

1975-76, 75-76

1975-76, 75-76


So it is not easy to sort this column.

Is there a way to resolve this issue ?

Thanks
 

Etoto

XLDnaute Barbatruc
Hi ;)

In a file I have a column with numbers.

Some rows contain few numbers

Ex :

Regarde la pièce jointe 1155534

So it is not easy to sort this column.

Is there a way to resolve this issue ?

Thanks
Hello,

You're in french forum, you must have to create a new topic in a English forum even a few of us speak a little English. Sorry for my English, i'm still studying this language . 🤣
 

vgendron

XLDnaute Barbatruc
Hi @moanin

as explained by Etoto, this is french forum, you probably will have more answers in English forum
anyway, we can try.
first, you should provide an example file and explain which result you expect

i think that the last 3 rows (1964... 1975-) will be considered as alpha, and will be sorted prior to numbers
 

moanin

XLDnaute Impliqué
Pardon ;)
Voici le texte en Français :

Impossible de trier une colonne

Bonjour
Dans un tableau, j'ai une colonne contenant des chiffres.
Certaines lignes contiennent peu de chiffres
Ex :

Il n'est donc pas facile de trier cette colonne.
Existe-t-il un moyen de résoudre ce problème ?
Merci

2020
2021
2021
2022
2026
1964-65, 69, 69, 71
1975-76, 75-76
1975-76, 75-76
 

JHA

XLDnaute Barbatruc
Bonjour à tous,

Le but est de retrouver la première année de la liste.
VB:
=SIERREUR(CNUM(GAUCHE(SUBSTITUE(C3;",";"-");4));CNUM(SI((GAUCHE(SUBSTITUE(C3;",";"-");2)*1)>50;"19";"20")&GAUCHE(SUBSTITUE(C3;",";"-");2)))
si il y a l'année en 4 digits sur les 4 premiers caractères de la colonne alors on affiche cette année sinon lorsque qu'il n'y a que 2 caractères alors on ajoute 19 ou 20 suivant l'année à 2 chiffres.

JHA
 

Pièces jointes

  • Copie de Sondes spatiales survol, orbitales bis alleg bis.xlsx
    106.8 KB · Affichages: 2

patricktoulon

XLDnaute Barbatruc
bonsoir à tous
@moanin good evening
in fact sorting or filtering on numbers is capricious
especially since there you have a sequence of decimal numbers which follow each other so it is no longer numeric so you have to work in text (filter and sort)

I explain part of it here

 

TooFatBoy

XLDnaute Barbatruc
Est-ce que tu as accès au format des cellules pour forcer en "Texte" ?
Ah ben non, il ne suffit pas de forcer le format texte (suivi d'un copier/collage spécial => valeurs).
Malgré ça, ça reste trié d'une façon qui semble... aléatoire.


C'est la fonction ShuffleSort qui est utilisée par Microsoft, comme dans leur Explorateur ??? 🤣
 
Dernière édition:

Statistiques des forums

Discussions
312 248
Messages
2 086 593
Membres
103 248
dernier inscrit
Happycat