Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
C Brandt
 
Posts: n/a
Default Numbers that are really not numbers?

Spent about 30 minutes today fixing a column of numbers that I needed to act
like numbers, not text.

479862673



479862673

The first number above has a character in front of it that prevents it from
being treated like a number. If I were to multiply it by one I get the
#VALUE! error. I deleted the first character and then it acts like a number.

I finaly figured out that a RIGHT(text,9) will solve my problem.

Is there a simpler solution?

Thanks in advance,
Craig



  #2   Report Post  
Posted to microsoft.public.excel.misc
JE McGimpsey
 
Posts: n/a
Default Numbers that are really not numbers?

One way:

Copy an empty cell. Select your "text numbers". Choose Edit/Paste
Special, selecting the Values and Add radio buttons. Click OK.

In article ,
"C Brandt" wrote:

Spent about 30 minutes today fixing a column of numbers that I needed to act
like numbers, not text.

479862673



479862673

The first number above has a character in front of it that prevents it from
being treated like a number. If I were to multiply it by one I get the
#VALUE! error. I deleted the first character and then it acts like a number.

I finaly figured out that a RIGHT(text,9) will solve my problem.

Is there a simpler solution?

Thanks in advance,
Craig

  #3   Report Post  
Posted to microsoft.public.excel.misc
C Brandt
 
Posts: n/a
Default Numbers that are really not numbers?

JE:
Thanks for the suggestion. Tried it but it didn't work for me. The problem
turns out to be that pesky first non-printable character. I thought
CLEAN(A1) would work(A1 contains the number/test), it didn't. Eventually I
tried the RIGHT(A1,9) but the first attempt at this, I miscounted the
digits and entered RIGHT(A1,10). I was in a deadline crisis mode so I
manually deleted the first character of around 200 entries, twice. It was in
later research that I stubbled onto my error and used the correct RIGHT
formula.

Thanks for the response. I can live with the RIGHT function, just
disapointed that the CLEAN function didn't do the job.

Regards,

Craig

"JE McGimpsey" wrote in message
...
One way:

Copy an empty cell. Select your "text numbers". Choose Edit/Paste
Special, selecting the Values and Add radio buttons. Click OK.

In article ,
"C Brandt" wrote:

Spent about 30 minutes today fixing a column of numbers that I needed to

act
like numbers, not text.

479862673



479862673

The first number above has a character in front of it that prevents it

from
being treated like a number. If I were to multiply it by one I get the
#VALUE! error. I deleted the first character and then it acts like a

number.

I finaly figured out that a RIGHT(text,9) will solve my problem.

Is there a simpler solution?

Thanks in advance,
Craig



  #4   Report Post  
Posted to microsoft.public.excel.misc
Niek Otten
 
Posts: n/a
Default Numbers that are really not numbers?

Hi Craig,

Use David McRitchie's TRIMALL() function which can be downloaded he

http://www.mvps.org/dmcritchie/excel/join.htm#trimall

--
Kind regards,

Niek Otten

"C Brandt" wrote in message ...
| JE:
| Thanks for the suggestion. Tried it but it didn't work for me. The problem
| turns out to be that pesky first non-printable character. I thought
| CLEAN(A1) would work(A1 contains the number/test), it didn't. Eventually I
| tried the RIGHT(A1,9) but the first attempt at this, I miscounted the
| digits and entered RIGHT(A1,10). I was in a deadline crisis mode so I
| manually deleted the first character of around 200 entries, twice. It was in
| later research that I stubbled onto my error and used the correct RIGHT
| formula.
|
| Thanks for the response. I can live with the RIGHT function, just
| disapointed that the CLEAN function didn't do the job.
|
| Regards,
|
| Craig
|
| "JE McGimpsey" wrote in message
| ...
| One way:
|
| Copy an empty cell. Select your "text numbers". Choose Edit/Paste
| Special, selecting the Values and Add radio buttons. Click OK.
|
| In article ,
| "C Brandt" wrote:
|
| Spent about 30 minutes today fixing a column of numbers that I needed to
| act
| like numbers, not text.
|
| 479862673
|
|
|
| 479862673
|
| The first number above has a character in front of it that prevents it
| from
| being treated like a number. If I were to multiply it by one I get the
| #VALUE! error. I deleted the first character and then it acts like a
| number.
|
| I finaly figured out that a RIGHT(text,9) will solve my problem.
|
| Is there a simpler solution?
|
| Thanks in advance,
| Craig
|
|


  #5   Report Post  
Posted to microsoft.public.excel.misc
RagDyeR
 
Posts: n/a
Default Numbers that are really not numbers?

The easiest way to convert text numbers that are preceded with an apostrophe
to be XL recognized *true* numbers, and accomplish this 'en masse', is to
use TTC (Text to Columns).

Select the column of "bad" numbers,
Then simply open and close TTC.

<Data <TextToColumns <Finish

And you're done!

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"C Brandt" wrote in message
...
JE:
Thanks for the suggestion. Tried it but it didn't work for me. The problem
turns out to be that pesky first non-printable character. I thought
CLEAN(A1) would work(A1 contains the number/test), it didn't. Eventually I
tried the RIGHT(A1,9) but the first attempt at this, I miscounted the
digits and entered RIGHT(A1,10). I was in a deadline crisis mode so I
manually deleted the first character of around 200 entries, twice. It was in
later research that I stubbled onto my error and used the correct RIGHT
formula.

Thanks for the response. I can live with the RIGHT function, just
disapointed that the CLEAN function didn't do the job.

Regards,

Craig

"JE McGimpsey" wrote in message
...
One way:

Copy an empty cell. Select your "text numbers". Choose Edit/Paste
Special, selecting the Values and Add radio buttons. Click OK.

In article ,
"C Brandt" wrote:

Spent about 30 minutes today fixing a column of numbers that I needed to

act
like numbers, not text.

479862673



479862673

The first number above has a character in front of it that prevents it

from
being treated like a number. If I were to multiply it by one I get the
#VALUE! error. I deleted the first character and then it acts like a

number.

I finaly figured out that a RIGHT(text,9) will solve my problem.

Is there a simpler solution?

Thanks in advance,
Craig






  #6   Report Post  
Posted to microsoft.public.excel.misc
excelent
 
Posts: n/a
Default Numbers that are really not numbers?

nope no Excel-function for that (i wonder too :-) )
a VBA macro can do it, if u vant it just say
  #7   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Numbers that are really not numbers?

--text

Regards,
Bernd

  #8   Report Post  
Posted to microsoft.public.excel.misc
excelent
 
Posts: n/a
Default Numbers that are really not numbers?

haw does that 1 works (--text) ? :-)


" skrev:

--text

Regards,
Bernd


  #9   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Numbers that are really not numbers?

Hello,

--" 123" is the number 123.

Or if you have ' 123 in cell A1 then --A1 will give you the number 123
again.

HTH,
Bernd

  #10   Report Post  
Posted to microsoft.public.excel.misc
excelent
 
Posts: n/a
Default Numbers that are really not numbers?

oh ok, was hoping that it could fix fx. a123 to 123


" skrev:

Hello,

--" 123" is the number 123.

Or if you have ' 123 in cell A1 then --A1 will give you the number 123
again.

HTH,
Bernd




  #11   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Numbers that are really not numbers?

Hello,

Then take this UDF:
Function XtractNum(s As String) As Double
Dim i As Long, d As Double, c As String, f As Double

i = 0: d = 0#: f = 1#

StateStart:
i = i + 1
If i Len(s) Then GoTo StateEnd
c = Mid(s, i, 1)
Select Case c
Case "0" To "9", "."
d = CDbl(c)
GoTo StatePreComma
Case Else
GoTo StateStart
End Select

StatePreComma:
i = i + 1
If i Len(s) Then GoTo StateEnd
c = Mid(s, i, 1)
Select Case c
Case "0" To "9"
d = 10# * d + CDbl(c)
GoTo StatePreComma
Case "."
GoTo StatePostComma
Case Else
GoTo StateEnd
End Select

StatePostComma:
i = i + 1
If i Len(s) Then GoTo StateEnd
c = Mid(s, i, 1)
Select Case c
Case "0" To "9"
f = f / 10#
d = d + CDbl(c) * f
GoTo StatePostComma
Case Else
GoTo StateEnd
End Select

StateEnd:
XtractNum = d

End Function

HTH,
Bernd

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
Why are 1/2 my numbers imported as text and the rest as numbers? KBear Excel Discussion (Misc queries) 2 April 21st 06 01:40 PM
How to sum top 5 numbers from the column of numbers Martin Excel Discussion (Misc queries) 1 May 23rd 05 07:32 PM
Averaging Numbers when 2 numbers in one cell Ourania Excel Worksheet Functions 8 January 12th 05 06:40 PM
Validating random numbers plsauditor Excel Worksheet Functions 2 January 11th 05 11:12 PM
Sorting when some numbers have a text suffix confused on the tundra Excel Discussion (Misc queries) 5 December 18th 04 10:19 PM


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

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

About Us

"It's about Microsoft Excel"