Re: "-" ignored in sort
From: Dave Peterson (ec35720_at_netscapeXSPAM.com)
Date: 01/02/05
- Next message: Norman Jones: "Re: make XL stop interpreting email addresses as highlighted links?"
- Previous message: Ragdyer: "Re: make XL stop interpreting email addresses as highlighted links?"
- In reply to: Mike H: ""-" ignored in sort"
- Next in thread: Mike H: "Re: "-" ignored in sort"
- Reply: Mike H: "Re: "-" ignored in sort"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 01 Jan 2005 18:35:39 -0600
>From xl2002's help (for: Troubleshoot sorting)
Apostrophes (') and hyphens (-) are ignored, with one exception: If two text
strings are the same except for a hyphen, the text with the hyphen is sorted
last.
Can you use a period instead?
or even
=b1&char(10)&c1
This will be like an alt-enter if the cell is set for wrap text--else it'll show
a little square.
Mike H wrote:
>
> The hypen character "-" seems to be ignored in a sort that I'm using.
>
> Here are the details:
> I have a work*** that uses vendor name and partnumber in the form of
> "vendor-part" that then uses vlookup to query a vendor file with these
> fields applicable fields:
>
> column a column b column c
> =B1&"-"&C1 vendor part
>
> Strangely, to me, a sort using column A doesn't produce the same results
> as a sort using column B plus column C.
>
> For example, using only column A for the sort:
> A-C75A A C75A
> ACB-15 ACB 15
> A-CG1850 A CG1850
>
> using column A + column B
> A-C75A A C75A
> A-CG1850 A CG1850
> ACB-15 ACB 15
>
> As a result, if I use TRUE in the range_lookup portion of the vlookup
> function I have no idea what the outcome will be. I don't know if
> vlookup is considering a sorted array in the same way that SORT is.
>
> I suppose this is a two-part question:
> 1) what would the result be of a lookup for A-C8? I seem to get A-C75A
> using a column A sort and #NA using a column B+C sort.
> 2) given the sorting behavior, how do I want to sort this table, or
> which character besides a hypen can use to get both good vlookup results
> and sensible visual results as well?
> --
> Mike H
-- Dave Peterson
- Next message: Norman Jones: "Re: make XL stop interpreting email addresses as highlighted links?"
- Previous message: Ragdyer: "Re: make XL stop interpreting email addresses as highlighted links?"
- In reply to: Mike H: ""-" ignored in sort"
- Next in thread: Mike H: "Re: "-" ignored in sort"
- Reply: Mike H: "Re: "-" ignored in sort"
- Messages sorted by: [ date ] [ thread ]