Ask Your Question
0

How can I sort a-z ignoring spaces and hyphens, please? [closed]

asked 2013-10-14 07:51:43 +0200

Ken McAllister gravatar image

updated 2013-10-14 08:21:27 +0200

oweng gravatar image

Items in a book index of 6000 items

aa b,  
aa c,
aa-b,  
aa-c,
aaab,  
aab,
aac,

so sorted, must appear instead as

aaab, 
aa b,  
aa-b,  
aab,
aa c,
aa-c,
aac
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-11-12 06:31:00.878600

3 Answers

Sort by » oldest newest most voted
1

answered 2013-10-14 12:21:27 +0200

JohnSUN gravatar image

updated 2013-10-14 12:23:30 +0200

Add a temporary column for additional calculations.

Enter the formula

=SUBSTITUTE(SUBSTITUTE(<first source cell>;" ";"");"-";"")

Multiply the formula to all cells of the sorted column.

Sort the entire region from the values ​​of the auxiliary column.

Delete the temporary column

Sort Without Spaces

edit flag offensive delete link more
1

answered 2013-10-14 08:44:01 +0200

oweng gravatar image

I can't see anything in the options for enabling this type of sorting. Presumably you are looking to duplicate the difference between Letter by letter and Word by word sorting as supported by Adobe InDesign (shown here). The ICU collation engine used by LO does appear to support the ability to ignore punctuation, which would seem to be similar, however the lack of options may mean this functionality is not exposed to the user.

edit flag offensive delete link more

Comments

Bug 70782 - Other: enhancement request

Ken McAllister gravatar imageKen McAllister ( 2013-10-22 23:36:19 +0200 )edit
0

answered 2013-10-15 10:38:45 +0200

Ken McAllister gravatar image

updated 2013-10-22 23:40:15 +0200

Thank you, Oweng and JohnSUN, respectively for the background and the workaround. "Bug 70782 - Other: enhancement request" asks for this kind of sorting.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-10-14 07:51:43 +0200

Seen: 692 times

Last updated: Oct 22 '13