2012 Archives by date, by thread · List index

Re: [libreoffice-users] [Calc] Data sorting

```Hi :)
I just tend to add an extra 2 spaces in front of single-digit numbers.  If/when that doesn't work i

Like so ...
TheSameStreetName   7/3
TheSameStreetName 12/1
TheSameStreetName 15/1
TheSameStreetName 19A m21
TheSameStreetName 25A/2

or
TheSameStreetName 07/3
TheSameStreetName 12/1
TheSameStreetName 15/1
TheSameStreetName 19A m21
TheSameStreetName 25A/2

The leading zero looks dumb but it solves the problem.
Regards from

Tom :)

```
```________________________________
From: Brian Barker <b.m.barker@btinternet.com>
To: users@global.libreoffice.org
Sent: Thursday, 20 December 2012, 21:52
Subject: Re: [libreoffice-users] [Calc] Data sorting

At 21:57 20/12/2012 +0100, Gordom Noname wrote:
```
```Let say I have a list of my customers. Each raw consist of his/her
mixture of letters and numbers. Now I would like to sort this list
according to customers [location].

As the result I get something like this (1):

TheSameStreetName 12/1
TheSameStreetName 15/1
TheSameStreetName 19A m21
TheSameStreetName 25A/2
TheSameStreetName 7/3
```
```
Do I make something wrong? Why the list is sorted in that way (odd to me :-)?

The cell contents are text, so they are sorted alphabetically,
character by character.  1 comes before 2, which comes before 7, so
the three numbers starting with "1" come first.  These are then
sorted by the next character: 2 comes before 5, which comes before 9.

```
```But I would rather expect to get this kind of list (2):

TheSameStreetName 7/3
TheSameStreetName 12/1
TheSameStreetName 15/1
TheSameStreetName 19A m21
TheSameStreetName 25A/2

Is it possible to get the result according to list number 2?
```
```
Probably.  But you have to sort numerically, so you will either have
to separate the numbers from the street names (into separate cells:
you can then sort by those cells after sorting by street name) or
else keep the cells as they are but extract the number part into a
separate cell (which you can hide if you prefer) and then sort by those cells.

I trust this helps.

Brian Barker

--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

```
```--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
```