+ Reply to Thread
Results 1 to 6 of 6

Extract number out of long text

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2010
    Posts
    378

    Extract number out of long text

    Hello,

    Does anyone know how to extract number out of this text. For example,

    Central Pet - Auburn-Seattle - 4169
    C & S WHOLESALE GROCERS - 7304
    ALBERTSON'S - 28982
    MERCHANTS DISTRIBUTORS, INC. - 3860
    OVERWAITE FOOD GROUP ( SAVON FOODS) - 13866
    VALLEY FEED & SEED (K) - 3337


    All I want is the number behind the dash.


    Thanks

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Extract number out of long text

    give this a shot -- assumes data is in A1

    =RIGHT(A1,LEN(A1)-FIND("-",A1) -1 )
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: Extract number out of long text

    I tried the formula and the first one return AUBURN-SEATTLE - 4169. Is there a way to return 4169 only?

  4. #4
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Extract number out of long text

    I didn't notice you had multiple "-"....

  5. #5
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Extract number out of long text

    not mine but it seems to work

    =RIGHT(A1,LEN(A1)-SEARCH("@",SUBSTITUTE(A1," ","@",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Extract number out of long text

    Hi,

    Will there always be only one occurrence of a number in a given string?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

+ 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 text and number from a long text
    By tantcu in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-10-2013, 01:13 PM
  2. what formula to extract text from a long string?
    By SEMMatt in forum Excel General
    Replies: 5
    Last Post: 10-07-2012, 10:23 PM
  3. Extract multiple values from long strings of text
    By Patrick791 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-05-2012, 04:17 AM
  4. [SOLVED] Extract specific value from a long text string
    By Dinesh in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-10-2006, 11:30 PM
  5. Extract sub-string of number from field of long series of numbers
    By ExcelExtrator in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-27-2005, 07:00 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