[Solved] Sort a column of first and last names
[Solved] Sort a column of first and last names
Can you sort say a christian names and surnames in a column by the surname without putting the surname first?
Last edited by MrProgrammer on Fri Feb 23, 2024 10:31 pm, edited 2 times in total.
Reason: Tagged ✓ [Solved] Q: Sort names without putting surname first? A: No -- MrProgrammer, forum moderator
Reason: Tagged ✓ [Solved] Q: Sort names without putting surname first? A: No -- MrProgrammer, forum moderator
OPenOffice 4.1.1 on Windows 7
Re: sorting in columns
Not really, no.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
Re: Sort a column of names
An old trick, maybe not the best, is to use a helper column. Copy the list to a new column, select that column, then Data - Text to Columns..., tick Space as separator. That will give you several columns with christian names and hopefully one with surnames. Edit those to get a column with surnames. Now comes the tricky part. Move the surnames column next to your full names column, select both, then sort, using the surnames column as key.
Edit: Inspired by Hagar's warning: There is no known algorithm that can tell the difference between christian names and surnames, or can tell which parts of a name with three or more elements are christian names and which ones are part of the surname. You will have to inspect each row with three or more name elements and combine surname elements of the surnames in a single cell before you can sort them. |
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
- Hagar Delest
- Moderator
- Posts: 32670
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Sort a column of names
Beware of corner cases with the separator when there are names are surnames have spaces...
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Re: Sort a column of names
Compound names are a mess from the beginning and should never be considered data.
See https://www.kalzumeus.com/2010/06/17/fa ... out-names/ 1. through 40. and the statements below.
(An exception could be if all your contacts have names of type John Doe that are syntactically separable by exactly one space.)
See https://www.kalzumeus.com/2010/06/17/fa ... out-names/ 1. through 40. and the statements below.
(An exception could be if all your contacts have names of type John Doe that are syntactically separable by exactly one space.)
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München