Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How do I know the text or number within cell?

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?
I have tried following code, but it misses the last 4 digits.
In cell B2, Int(A1) = 2328050010001020000.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default How do I know the text or number within cell?

use simple formula in b2
=abs(a2)
even if that number is stored as text you will get number in b2


"Eric" 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?
I have tried following code, but it misses the last 4 digits.
In cell B2, Int(A1) = 2328050010001020000.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default How do I know the text or number within cell?

Numbers in Excel are limited to 15 significant figures.
--
David Biddulph

"Eric" wrote in message
...
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?
I have tried following code, but it misses the last 4 digits.
In cell B2, Int(A1) = 2328050010001020000.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default How do I know the text or number within cell?

And when you make it a number, how many significant figures can you see,
Prashant?
--
David Biddulph

"Prashant Runwal" wrote in
message ...
use simple formula in b2
=abs(a2)
even if that number is stored as text you will get number in b2


"Eric" 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?
I have tried following code, but it misses the last 4 digits.
In cell B2, Int(A1) = 2328050010001020000.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default How do I know the text or number within cell?

On Sun, 18 May 2008 03:25:00 -0700, Eric
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


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How do I know the text or number within cell?

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
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

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 947
Default How do I know the text or number within cell?

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" wrote in message ...

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
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
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default How do I know the text or number within cell?

Dear Eric,

If you have stored strings which are more than 15 char long, then during
sort warning select sort numbers and numbers stored as text seperately. I
have tried this and is giving desired result.

"Eric" wrote:

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
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy selected part number of text from one cell into another cell orewa Excel Discussion (Misc queries) 1 April 11th 08 01:30 PM
display text in one cell as a number in an adjacent cell in excel Denno New Users to Excel 1 November 16th 06 05:13 PM
count number of specified text within a text/cell Vikas Kumar Excel Discussion (Misc queries) 4 October 11th 06 12:43 PM
have one cell display text which reflects a number in another cell excelrookie Excel Discussion (Misc queries) 3 September 25th 06 05:49 PM
returning a text cell based on a number cell Josh7777777 Excel Worksheet Functions 2 November 2nd 04 07:42 PM


All times are GMT +1. The time now is 08:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"