+ Reply to Thread
Results 1 to 4 of 4

Extracting number from text, no consistency on where number is located in text

  1. #1
    Registered User
    Join Date
    08-01-2012
    Location
    Ohio
    MS-Off Ver
    Excel 2016
    Posts
    60

    Extracting number from text, no consistency on where number is located in text

    Need a formula to extract the 8 digit number from a string of text....which there is no consistency of where the number is located within the text.
    (attachment button isn't working for me, so I am pasting the text below)
    So for example, I need to extract 73004790 out of the first line.

    Product Title
    YardSmart 73004790 Decorative Screen Panel 2X4-Sprig, White
    Boerboel 73024430 Heavy Duty Drop Rod
    Boerboel Gate Solutions 73014253 Heavy-Duty Modern Wrap Hinge Pair, Black
    Boerboel Gate Solutions 73024418 - GardDog Locking Latch Two-Sided - Locking Latch
    Boerboel Gate Solutions 73014305 24 Heavy-Duty Drop Rod Black
    Boerboel 73014317 Self Closing Device
    Boerboel Gate Solutions 73014300 Pair Heavy-Duty Contemporary Wrap Hinge Black
    Boerboel Gate Solutions 73002218 Heavy-Duty Gate Latch Black
    Boerboel Heavy-Duty Modern Wrap Hinge Kit 73014301 Black(2 Pack)
    Boerboel Standard Chain Link/Farm Hinge 73014314 Silver(2 pack)
    YardSmart 73012418 Select Rail Square Bal Vinyl Railing, 6' x 36', White
    YardSmart 3.5 to 6.5 4-Piece Post Trim Base 73018131

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Extracting number from text, no consistency on where number is located in text

    If your happy with a UDF how about
    Please Login or Register  to view this content.
    Used like
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Extracting number from text, no consistency on where number is located in text

    Array-enter this formula for a string in A2 (enter using Ctrl-Shift-Enter)

    =SUM(IFERROR(VALUE(MID(SUBSTITUTE(A2&"x"," ","x"),ROW(INDIRECT("A1:A" &LEN(SUBSTITUTE(A2&"x"," ","x")))),8)),0))

    Note that if you ever have a 9 - or longer - digit number then it will return an incorrect result.
    Bernie Deitrick
    Excel MVP 2000-2010

  4. #4
    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 number from text, no consistency on where number is located in text

    Try this
    Enter in B2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1
    2 YardSmart 73004790 Decorative Screen Panel 2X4-Sprig, White 73004790
    3 Boerboel 73024430 Heavy Duty Drop Rod 73024430
    4 Boerboel Gate Solutions 73014253 Heavy-Duty Modern Wrap Hinge Pair, Black 73014253
    5 Boerboel Gate Solutions 73024418 - GardDog Locking Latch Two-Sided - Locking Latch 73024418
    6 Boerboel Gate Solutions 73014305 24 Heavy-Duty Drop Rod Black 73014305
    7 Boerboel 73014317 Self Closing Device 73014317
    8 Boerboel Gate Solutions 73014300 Pair Heavy-Duty Contemporary Wrap Hinge Black 73014300
    9 Boerboel Gate Solutions 73002218 Heavy-Duty Gate Latch Black 73002218
    10 Boerboel Heavy-Duty Modern Wrap Hinge Kit 73014301 Black(2 Pack) 73014301
    11 Boerboel Standard Chain Link/Farm Hinge 73014314 Silver(2 pack) 73014314
    12 YardSmart 73012418 Select Rail Square Bal Vinyl Railing, 6' x 36', White 73012418
    13 YardSmart 3.5 to 6.5 4-Piece Post Trim Base 73018131 73018131
    Last edited by AlKey; 05-09-2019 at 06:53 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

+ 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. Extracting text before number(s)
    By hotwax in forum Excel General
    Replies: 6
    Last Post: 06-27-2018, 09:07 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 number from cell contains both text and number alternatively
    By green369 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-03-2013, 10:17 AM
  4. Extracting number from text
    By Bob@Sun in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-09-2010, 11:40 AM
  5. Replies: 6
    Last Post: 07-29-2008, 03:23 PM
  6. [SOLVED] Extracting a 'number' from text
    By Anthony Slater in forum Excel General
    Replies: 5
    Last Post: 04-05-2005, 09:06 AM
  7. Extracting the number from a text
    By Venkatesh V in forum Excel General
    Replies: 1
    Last Post: 02-23-2005, 01:06 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