+ Reply to Thread
Results 1 to 8 of 8

Converting text into usuable number

  1. #1
    Registered User
    Join Date
    11-23-2012
    Location
    Massachusetts
    MS-Off Ver
    Home and Office 2016 32-bit
    Posts
    72

    Converting text into usuable number

    I am pulling out information from a cell using =RIGHT(C2,4). It gives me 6-2 in the cell, which is what I want. Now I want to sum the cell but can't figure out how to do it. I have tried converting it but it doesn't work, I tried pulling out each digit, but that didn't work. I am sure this is simple for all of you, but any help would be appreciated.

    Ideally, I would like a formula that could convert cell A1 into a result in one cell.

    Thanks for the help,
    Steveconverting text example.xlsx

  2. #2
    Forum Contributor
    Join Date
    04-24-2007
    Location
    NYC
    MS-Off Ver
    2k3/2k7/2010
    Posts
    270

    Re: Converting text into usuable number

    Will the numbers always be in the same position? 3rd from the right and last?

  3. #3
    Registered User
    Join Date
    04-29-2013
    Location
    Ontario, Canada
    MS-Off Ver
    MS Office 2010
    Posts
    80

    Re: Converting text into usuable number

    Here is what you can do based on your spreadsheet:

    1) Fix the formula of B1 to "=Right(A1,3)"
    2) Fix the formula of E1 to "=Left(B1,1)"
    3) In G1 type: "=value(E1)+value(F1)"
    Draconi

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Converting text into usuable number

    Try this, assuming that your data will not always be in the format/layout as in your sample...
    =--MID(A1,SEARCH(CHAR(160),A1,1)+1,FIND("-",A1,1)-FIND(CHAR(160),A1,1)-1)+MID(A1,FIND("-",A1,1),99)

    If the format will always be as per your sample, then use this...
    =MID(A1,5,1)-RIGHT(A1,1)

    edit: @ draconi, OP asked..."Ideally, I would like a formula that could convert cell A1 into a result in one cell."
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Converting text into usuable number

    Using your calculated value in B1

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If you want to use the value in A1 directly:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by newdoverman; 03-20-2014 at 07:35 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Converting text into usuable number

    6-2 is that 4 or 8?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Registered User
    Join Date
    11-23-2012
    Location
    Massachusetts
    MS-Off Ver
    Home and Office 2016 32-bit
    Posts
    72

    Re: Converting text into usuable number

    Thanks very much. FDibbins 1st option looks like it works, thank you.

    Newdoverman's 2nd option works, except is always adds.

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Converting text into usuable number

    If you want to subtract:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] CONVERTING NUMBER TO TEXT
    By RAJEEV CHADHA in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-14-2017, 07:40 AM
  2. Converting text into number
    By Mula in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-27-2009, 07:48 AM
  3. Converting A Number To Text
    By tomfernandez1 in forum Excel General
    Replies: 5
    Last Post: 04-15-2006, 09:30 AM
  4. converting text to number
    By Anat in forum Excel General
    Replies: 5
    Last Post: 02-23-2006, 04:30 PM
  5. converting from text to number
    By james in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2005, 12:06 AM

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