A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

sorting hybrid text/numbers/dashes



 
 
Thread Tools Display Modes
  #1  
Old May 12th, 2007, 04:59 PM posted to microsoft.public.word.tables
Andy
external usenet poster
 
Posts: 941
Default sorting hybrid text/numbers/dashes

Hello

I have a table with a column where the format is Chapter-Page#letter, e.g.
23-142a, 24-11b

I've been trying to get it to sort so it sorts Chapter number, then page
number, then a,b,c etc. No matter what I try, it will not work properly. It
won't sort the first number correctly.

What's the proper set up for this sort?
Thanks
Andrew
  #2  
Old May 12th, 2007, 09:07 PM posted to microsoft.public.word.tables
Helmut Weber
external usenet poster
 
Posts: 131
Default sorting hybrid text/numbers/dashes

Hi Andy,

so many ways...

I have a table with a column where the format
is Chapter-Page#letter, e.g.
23-142a, 24-11b


One method would be to add leading zeros before sorting
and then sorting as text,
then remove the leading zeros again.

For that method you'd have to find out,
how many digits the largest number before the dash has
and the same for the number following the dash.
Or you just know, three digits is sufficient.

23-142a - 023-142a
24-11b - 024-011b
1-333f - 001-333f
333-1x - 333-001x

I think, one could use excel as well,
to avoid programming, but that's no fun.

Do you need details?

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:46 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.