0

Ignore hyphens when sorting

I have a list and am sorting by a reference number.

The reference numbers have two formats, AB-C-01 and ABC02. Some have hyphens and some don't. With or without hypens, each reference is unique.

When I sort my list has all the hyphenated references first, then the unhyphenated. So they're not in order - or not the order I want.

AB-C-01

XY-Z-01

ABD01

I want ABD01 to be the second item in that list, not the third.

I can't remove the hyphens, they are my definitive reference number. How could I sort to result in 

AB-C-01

ADB01

XY-Z-01

Thanks for any pointers!

1 reply

null
    • John_Halls
    • 2 yrs ago
    • Reported - view

    Hi Davie

    You could create a formula field with

    replace(ReferenceNumber, "-", "")
    

    and then sort on this field instead.

    Regards John

Content aside

  • 2 yrs agoLast active
  • 1Replies
  • 30Views
  • 2 Following