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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|