sorting numbers with an irregular number of digits
Assuming your numbers are in column A, starting with A2, enter this
formula in a helper column:
=TEXT(A2,"000000")
and copy down. I've made this 6 digits, but you can leave out one of
the zeros if you wish. You can then include this column in your sort
area, and sort using the helper column as key field. If you don't need
it afterwards, you can delete the helper column.
Hope this helps.
Pete
hearthd wrote:
I am working on a database and am importing customer numbers that
initially started with 1 digit and now include 5 digit numbers. When
sorted, the numbers with fewer digits are mixed in with the larger
digit numbers. Is there a way to add zeroes to the smaller numbers so
they sort correctly?
|