When (if) you get the message from Excel as to how to sort,
choose the option to sort anything that looks like a number as a number.
If you don't get that option or it doesn't work then in an adjoining column
enter this formula... =LEFT(B5,FIND("-",B5,1)-1) + 0
The formula assumes your data starts in cell B5 (adjust as necessary).
Fill the formula down, copy the list of formulas and paste "values" over them.
Sort your data using the new column as the sort column.
--
Jim Cone
San Francisco, USA
http://www.officeletter.com/blink/specialsort.html
"Bernie"
wrote in message
Hope someone can help me with a similar problem. I am putting together a
database relating to horse racing. Each field shows how well a trainer has
done, quoting the number of winners from the total number of runners. An
example entry would be 8-20, which means 8 winners from 20 runners.
However when I try and sort entries to compare it works fine for single
digit numbers on the left, but then stops sorting numerically by the left
hand digit.
Has anyone any ideas?
"Sloth" wrote:
If they are sorting that way then I think they are formatted as text. You
"can" use a helper column as Pete suggest, but you can also convert all your
cells to numbers. To do this simply copy a blank cell, select your range,
paste special selecting "add". This will convert all text that looks like a
number to a number. Your list should then sort how you want. It kind of
depends on your preference really... Hope this helps :)
"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?