Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort to include hyphen
I'm having a problem with sorting my Data. When Excel does a sort, it
does not include hyphens. So MV-2 would come after MV1. But later, when I try to import new data, I am doing a binary search. In this search, MV-2, would be seen as less than MV1, because a '-' is less than 1. Is there any way to do a quick sort that includes the '-' in the search criteria? Thanks, Matt |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort to include hyphen
How about using another column of cells with a formula in it and sort your range
on that. The code for the hypen is 45 (=code("-")) The code for a dot is 46 (=code(".")) Maybe: =substitute(a1,"-",".") It may cause some confusion if you have items like MV-1 and MV.1, though. mcolson wrote: I'm having a problem with sorting my Data. When Excel does a sort, it does not include hyphens. So MV-2 would come after MV1. But later, when I try to import new data, I am doing a binary search. In this search, MV-2, would be seen as less than MV1, because a '-' is less than 1. Is there any way to do a quick sort that includes the '-' in the search criteria? Thanks, Matt -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sort Room Numbers that include Alphabetes | Excel Worksheet Functions | |||
How do you change sort defaults for combined text number & hyphen. | Excel Discussion (Misc queries) | |||
sort cells with hyphen #####-###-#### | Excel Discussion (Misc queries) | |||
sort cells with hyphen #####-###-#### | Excel Discussion (Misc queries) | |||
Why does sort always default to include a header row. I want the. | Excel Programming |