+ Reply to Thread
Results 1 to 8 of 8

Converting text to numbers

  1. #1
    Forum Contributor
    Join Date
    07-27-2009
    Location
    montreal, canada
    MS-Off Ver
    Excel 2003
    Posts
    230

    Converting text to numbers

    Hi,
    my bank statement cannot come in through CSV, I have to copy and paste it from the web.
    Amounts that come from this paste into excel look like what you'll find in colomn A.

    I've tried three tests to return a number that can be added.

    Yet I still have issues returning proper numerical values.
    Please don't tell me to use value(), it's more intriquite than what you might think.

    (*22*862,87*$)

    value on this doesn't return a number. Substituting coma for a dot is fine, I've done it in the second colomn but,substitute on the space between 22 and 862, well it's not a space, I still haven't figured out what it is, so I can't substitute it.


    I humbely hope someone has something.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Converting text to numbers

    Try this (assuming the values with () are supposed to be negative)

    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,",","."),"$",),CHAR(160),"")*1
    Does that work for you?

    EDIT: to avoid #Value errors
    =IF(A2<>"",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,",","."),"$",),CHAR(160),"")*1,"")
    Last edited by ChemistB; 06-18-2012 at 05:14 PM.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Converting text to numbers

    Try this:

    =LEFT(A2,LEN(A2)-3)*1

    EDIT: Only works for positive values. If ChemistB's suggestion works, then stick to that.
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  4. #4
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Converting text to numbers

    there is a formula that Ron Coderre had created, one that is for ages.

    put this in C2 and drag-fill down:

    Please Login or Register  to view this content.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  5. #5
    Forum Contributor
    Join Date
    07-27-2009
    Location
    montreal, canada
    MS-Off Ver
    Excel 2003
    Posts
    230

    Re: Converting text to numbers

    And you sir,
    have the right answer!
    Thank you.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Converting text to numbers

    I wonder which "sir" had the right answer?

  7. #7
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Converting text to numbers

    isn't it obvious? there is only one "sir" here, rest are commoners...

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Converting text to numbers

    My thoughts exactly

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1