+ Reply to Thread
Results 1 to 2 of 2

Extract Numbers from Alpha-Numeric String

  1. #1
    MrBill
    Guest

    Extract Numbers from Alpha-Numeric String

    I have an Alpha-Numeric String. I need to Extract the numbers and use them in
    calculations.

    Example String: PL1 1/2x5 1/2
    I need to return the "1 1/2" as 1.5
    And the "5 1/2" as 5.5
    I guess it would be easier to say that I need to "OMIT" the Leading Alpha
    Characters, Replace the Fractionals to Decimals, replace the "x" with *.
    The result to be: 1.5*5.5

  2. #2
    Roger Govier
    Guest

    Re: Extract Numbers from Alpha-Numeric String

    Hi

    Try
    =TEXT(MID(A1,3,5),"0.00")&" * "&TEXT(MID(A1,9,5),("0.00"))
    This works fine with the sample shown.
    If the numbers are going to be larger, I think I would use a helper cell to
    split off the leading Alpha's e.g. in cell B1
    =MID(A1,3,255)
    then on the resulting cell use
    =TEXT(LEFT(B1,FIND("x",B1)-1),"0.00")&" * "
    &TEXT(MID(B1,FIND("x",B1)+1,20),"0.00")


    Regards

    Roger Govier


    MrBill wrote:
    > I have an Alpha-Numeric String. I need to Extract the numbers and use them in
    > calculations.
    >
    > Example String: PL1 1/2x5 1/2
    > I need to return the "1 1/2" as 1.5
    > And the "5 1/2" as 5.5
    > I guess it would be easier to say that I need to "OMIT" the Leading Alpha
    > Characters, Replace the Fractionals to Decimals, replace the "x" with *.
    > The result to be: 1.5*5.5


+ 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