+ Reply to Thread
Results 1 to 5 of 5

Extract numbers from text string

  1. #1
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Office 2010
    Posts
    164

    Extract numbers from text string

    I'm using Excel 2010, just in case.

    I have a cell that has combined data like this: "45 Days, 12 Hrs, 35 Mins" in column A.

    In column B I would like to extract the numeric value of "45", then in column C I would like to extract the numeric value of "12", and the in column D, extract the numeric value of "35". Can anyone help me out with this?

  2. #2
    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: Extract numbers from text string

    Enter formula in B1 and drag it across and down (if needed)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C D
    1 45 Days, 12 Hrs, 35 Mins 45 12 35
    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

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Extract numbers from text string

    this is my attempt...
    in B1, =LEFT(A1,SEARCH("days",A1)-2)
    in C1, =MID(A1,SEARCH("hrs",A1)-3,2)
    in D1, =MID(A1,SEARCH("mins",A1)-3,2)
    adjust to your range.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Office 2010
    Posts
    164

    Re: Extract numbers from text string

    Alkey, thank you so much... That was perfect!

  5. #5
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Extract numbers from text string

    Hi,

    This will also work, just a little shorter:

    Excel 2016 (Windows) 64 bit
    A
    B
    C
    D
    1
    45 Days, 12 Hrs, 35 Mins 45 12 35
    Sheet: Sheet140

    Excel 2016 (Windows) 64 bit
    B
    1
    =TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",100)),COLUMNS($B1:B1)*200-199,100))
    Sheet: Sheet140

    Formula copied across.

+ 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] Extract numbers from text string
    By cmb80 in forum Excel General
    Replies: 3
    Last Post: 05-22-2017, 05:17 AM
  2. [SOLVED] help with a formula to extract numbers from a text string
    By Wannabarn in forum Excel General
    Replies: 9
    Last Post: 02-08-2017, 12:12 AM
  3. Extract Several Numbers From Text String
    By mvl3589 in forum Excel General
    Replies: 5
    Last Post: 06-21-2016, 08:11 PM
  4. [SOLVED] Extract numbers from text string
    By reynoldslarry in forum Excel General
    Replies: 6
    Last Post: 10-25-2014, 03:22 PM
  5. extract and sum numbers from a text string
    By Shazwb in forum Excel General
    Replies: 5
    Last Post: 08-28-2011, 09:24 PM
  6. Extract numbers from text string
    By mkvassh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-24-2009, 08:53 AM
  7. [SOLVED] EXTRACT NUMBERS FROM TEXT STRING
    By fiber_doc in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-28-2005, 02:45 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