+ Reply to Thread
Results 1 to 7 of 7

Extracting text and numbers

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,702

    Extracting text and numbers

    Hi,

    I have a cell from a database which doesn’t split out the text and numbers into separate columns so I would like to do this manually.

    I have the following codes to split certain elements out:

    Text
    =LEFT(B15,MIN(FIND({0,1,2,3,4,5,6,7,8,9},B15&"0123456789"))-1)
    Number
    =LOOKUP(10^99,--MID(B15,MIN(IF((--ISNUMBER(--MID(B15,ROW($1:$25),1))=0)*ISNUMBER(--MID(B15,ROW($2:$26),1)),ROW($2:$26))),ROW($1:$25)))
    (CSE Formula)

    The Problem I have is that it doesn’t deal with the fact it’s a negative number, is there a workaround?
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Extracting text and numbers

    Hi,

    With sample data this seems to work,

    Extract number first with below formula in E16

    =LOOKUP(9.9999999E+307,--RIGHT(B15,ROW(INDIRECT("1:"&LEN(B15)))))

    Than text with below formula
    =TRIM(SUBSTITUTE(B15,E16,""))

    Regards,

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Extracting text and numbers

    Using your posted workbook,
    this regular formula returns the number from the end of the text
    E15: =IFERROR(LOOKUP(99^99,--RIGHT(B15,ROW(INDIRECT("1:"&LEN(B15))))),"")
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Extracting text and numbers

    Another Try but not clever solution

    Regards
    Attached Files Attached Files

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Extracting text and numbers

    Or this

    =LOOKUP(25^25,--RIGHT(B15,ROW(A$1:A$1000)-1))
    Last edited by AlKey; 11-18-2014 at 02:38 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  6. #6
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,702

    Re: Extracting text and numbers

    Thanks all - all codes supplied worked!

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Extracting text and numbers

    You're welcome and thank you for the feedback!

+ 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] extracting numbers from a string of text and numbers
    By ScottLor in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-05-2013, 04:47 PM
  2. Extracting numbers and text from inconsistent text/number formatted string
    By Brandivil in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-25-2013, 01:46 PM
  3. [SOLVED] Extracting Numbers from text
    By hoventim in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 12-11-2012, 09:08 AM
  4. Replies: 17
    Last Post: 03-03-2010, 06:55 PM
  5. Extracting numbers from text
    By bmind in forum Excel General
    Replies: 6
    Last Post: 02-23-2010, 11:16 PM

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