Re: How do I know the text or number within cell?
- From: "Dana DeLouis" <ddelouis@xxxxxxxxxxxxx>
- Date: Mon, 19 May 2008 09:07:55 -0400
Hi. In general, when one sorts strings like
"2328050010001023841"
and
"567"
Excel looks at the first character and will sort the string beginning with 2 before the string starting with 5
A general method might be to pad all string with 0's in the front to form a standard length string... then sort.
There are many ways to do this, but in general, perhaps form a new string from "567" by using something like this. (A2 is 567)
=RIGHT("0000000000000000000" & A2,19)
If you sort on this newer string, it should work as you expect.
--
HTH :>)
Dana DeLouis
"Eric" <Eric@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:ABC132C0-DA36-4370-BD74-D6F2BFD92682@xxxxxxxxxxxxxxxx
For my case, in cell A2, there is char 2328050010001023841. The value must be
string instead of number based on Excel's specifications has 15 digit
precision.
If I get a list of string under A column, does anyone have any suggestions
on how to sort it in ascending order based on macro coding?
Thank everyone very much for any suggestions
Eric
"Ron Rosenfeld" wrote:
On Sun, 18 May 2008 03:25:00 -0700, Eric <Eric@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
In cell A2, there is char 2328050010001023841.
I am not sure whether the char is text or number, does anyone have any
suggestions on how to force it into number?
You won't be able to do that in Excel. If you check Excel's specifications,
you will discover that it has 15 digit precision.
--ron
- References:
- How do I know the text or number within cell?
- From: Eric
- Re: How do I know the text or number within cell?
- From: Ron Rosenfeld
- Re: How do I know the text or number within cell?
- From: Eric
- How do I know the text or number within cell?
- Prev by Date: Re: Excel 2002: Formulas stop calculate correctly after 13.4MB
- Next by Date: Re: Formatting a table
- Previous by thread: Re: How do I know the text or number within cell?
- Next by thread: Re: How do I know the text or number within cell?
- Index(es):
Relevant Pages
|