WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

cannot convert text string into value

 
Goto page 1, 2, 3
   Home -> Office -> Worksheet Functions RSS
Next:  sumproduct text  
Author Message
Andy

External


Since: Sep 01, 2008
Posts: 6



(Msg. 1) Posted: Mon Sep 01, 2008 9:34 pm
Post subject: cannot convert text string into value
Archived from groups: microsoft>public>excel>worksheet>functions (more info?)

Dear all,

I can convert a text string "12345" into the value 12,345.00 by using
Value(text).
However when I copy a text string "12345" from the monthly e-bill statement
and using value(text) to convert it, it only returns a #value! error.
How can I convert that string into value?

thanks


Andy
Back to top
Login to vote
Pete_UK

External


Since: Apr 17, 2007
Posts: 4147



(Msg. 2) Posted: Mon Sep 01, 2008 9:34 pm
Post subject: Re: cannot convert text string into value [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Check the string more closely - you may have a non-breaking space
character at the end, in which case you could use:

=VALUE(LEFT(A1,LEN(A1)-1))

or

=VALUE(RIGHT(A1,LEN(A1)-1))

if it's only a single space (and depending on if it is at the start or
the end).

Hope this helps.

Pete

On Sep 1, 2:34 pm, "Andy" <Andy_1....TakeThisOut@gamil.com> wrote:
> Dear all,
>
> I can convert a text string "12345" into the value 12,345.00 by using
> Value(text).
> However when I copy a text string "12345" from the monthly e-bill statement
> and using value(text) to convert it, it only returns a #value! error.
> How can I convert that string into value?
>
> thanks
>
> Andy
Back to top
Login to vote
David Biddulph

External


Since: Feb 24, 2007
Posts: 5296



(Msg. 3) Posted: Mon Sep 01, 2008 9:34 pm
Post subject: Re: cannot convert text string into value [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You've probably got non-printing characters as well as your string 12345.
Get rid of those extra characters.
--
David Biddulph

"Andy" <Andy_1011.TakeThisOut@gamil.com> wrote in message
news:OPLR6dDDJHA.3432@TK2MSFTNGP05.phx.gbl...
> Dear all,
>
> I can convert a text string "12345" into the value 12,345.00 by using
> Value(text).
> However when I copy a text string "12345" from the monthly e-bill
> statement and using value(text) to convert it, it only returns a #value!
> error.
> How can I convert that string into value?
>
> thanks
>
>
> Andy
>
>
Back to top
Login to vote
Don Guillett

External


Since: Jan 04, 2006
Posts: 5307



(Msg. 4) Posted: Mon Sep 01, 2008 9:34 pm
Post subject: Re: cannot convert text string into value [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Try this
Sub fixmynums()
Application.ScreenUpdating = False
On Error Resume Next
For Each C In Selection 'Range("a1:q" & lr)
If Trim(Len(C)) > 0 And C.HasFormula = False Then
C.NumberFormat = "General"
C.Value = CDbl(C)
End If
Next

Application.ScreenUpdating = True
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1.TakeThisOut@austin.rr.com
"Andy" <Andy_1011.TakeThisOut@gamil.com> wrote in message
news:OPLR6dDDJHA.3432@TK2MSFTNGP05.phx.gbl...
> Dear all,
>
> I can convert a text string "12345" into the value 12,345.00 by using
> Value(text).
> However when I copy a text string "12345" from the monthly e-bill
> statement and using value(text) to convert it, it only returns a #value!
> error.
> How can I convert that string into value?
>
> thanks
>
>
> Andy
>
>
Back to top
Login to vote
Ron Rosenfeld

External


Since: Aug 26, 2003
Posts: 4131



(Msg. 5) Posted: Mon Sep 01, 2008 9:34 pm
Post subject: Re: cannot convert text string into value [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 1 Sep 2008 21:34:24 +0800, "Andy" <Andy_1011.DeleteThis@gamil.com> wrote:

>Dear all,
>
>I can convert a text string "12345" into the value 12,345.00 by using
>Value(text).
>However when I copy a text string "12345" from the monthly e-bill statement
>and using value(text) to convert it, it only returns a #value! error.
>How can I convert that string into value?
>
>thanks
>
>
>Andy
>

You have "invisible" characters in the string.

Try this to process the string into a number:

A1: your_text_string

=--SUBSTITUTE(TRIM(A1),CHAR(160),"") or
=--SUBSTITUTE(CLEAN(A1),CHAR(160),"")



--ron
Back to top
Login to vote
Pete_UK

External


Since: Apr 17, 2007
Posts: 4147



(Msg. 6) Posted: Mon Sep 01, 2008 9:34 pm
Post subject: Re: cannot convert text string into value [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Obviously, spaces are difficult to see !! <g>

If your text number is in A1, put this formula somewhere:

=LEN(A1)

to see how many characters are actually in that cell. Is it the same
as how many you think there are?

Another thing to try is to select the cell and then to click in the
extreme right of the formula bar as if to edit the cell, and see where
the cursor ends up - it might be a space away from your last digit.

Hope this helps.

Pete


On Sep 1, 3:55 pm, "Andy" <Andy_1....DeleteThis@gamil.com> wrote:
> thank you Pete but i can sure no space at all.
>
> Andy
>
> "Pete_UK" <pashu....DeleteThis@auditel.net>
> ???????:8e26d3d6-73e7-4cd1-8828-379f24f37...@k13g2000hse.googlegroups.com....
> Check the string more closely - you may have a non-breaking space
> character at the end, in which case you could use:
>
> =VALUE(LEFT(A1,LEN(A1)-1))
>
> or
>
> =VALUE(RIGHT(A1,LEN(A1)-1))
>
> if it's only a single space (and depending on if it is at the start or
> the end).
>
> Hope this helps.
>
> Pete
>
> On Sep 1, 2:34 pm, "Andy" <Andy_1....DeleteThis@gamil.com> wrote:
>
>
>
> > Dear all,
>
> > I can convert a text string "12345" into the value 12,345.00 by using
> > Value(text).
> > However when I copy a text string "12345" from the monthly e-bill
> > statement
> > and using value(text) to convert it, it only returns a #value! error.
> > How can I convert that string into value?
>
> > thanks
>
> > Andy- Hide quoted text -
>
> - Show quoted text -
Back to top
Login to vote
Pete_UK

External


Since: Apr 17, 2007
Posts: 4147



(Msg. 7) Posted: Mon Sep 01, 2008 9:34 pm
Post subject: Re: cannot convert text string into value [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You're welcome, Andy - thanks for feeding back.

Pete

On Sep 1, 8:47 pm, "Andy" <Andy_1....TakeThisOut@gamil.com> wrote:
> Oh my god~
>  you are right!
>
> Thanks indeed
>
> Andy
>
Back to top
Login to vote
Pete_UK

External


Since: Apr 17, 2007
Posts: 4147



(Msg. 8) Posted: Mon Sep 01, 2008 9:34 pm
Post subject: Re: cannot convert text string into value [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Or you can use the LEFT formula I gave you this morning - change the 1
to a 2 if you have 2 of these "spaces", etc.

Pete

On Sep 1, 8:52 pm, "Andy" <Andy_1....DeleteThis@gamil.com> wrote:
> Your formula still doesn't work as I find there is a space at the rightmost
> of the string, how can I eliminate it by formula?
>
> thanks
>
> Andy
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Worksheet Functions All times are: Eastern Time (US & Canada) (change)
Goto page 1, 2, 3
Page 1 of 3

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET