+ Reply to Thread
Results 1 to 7 of 7

Extract number that comes before a certain word in an alphanumeric cell

  1. #1
    Registered User
    Join Date
    03-26-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Exclamation Extract number that comes before a certain word in an alphanumeric cell

    Hi all,

    I'm hoping someone can help me out. I'm looking for a function that extracts a set of number that comes before the word "trips" in an alphanumeric cell. The cells contain clutter of words and numbers that sometimes the number (that comes before the word "trips") is at the beginning of a cell or sometime it's at the end of a cell.
    I did a bit of research and found a support page from MVP in ms office website but it doesn't give me the result that I need. http://office.microsoft.com/en-us/ex...001154901.aspx

    Example:

    E2 = 200 Trips - Structural
    E3 = Wheel - 300 Trips

    Result display:

    F2 = 200
    F3 = 300

    Thank you in advance.
    Cheers,
    Pearl
    Attached Files Attached Files
    Last edited by Pearla; 03-26-2012 at 11:16 PM. Reason: Add an attachment

  2. #2
    Valued Forum Contributor
    Join Date
    03-14-2012
    Location
    Arizona USA
    MS-Off Ver
    Excel 2000/2007
    Posts
    408

    Re: Extract number that comes before a certain word in an alphanumeric cell

    You should attach a sample of the workbook. The filter can be put inplace and sent back to you.

  3. #3
    Registered User
    Join Date
    03-26-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Extract number that comes before a certain word in an alphanumeric cell

    Attached a file.

    Cheers,
    Pearl

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Extract number that comes before a certain word in an alphanumeric cell

    Using your example, if all the numbers are three digits, you can simply use this formula

    Please Login or Register  to view this content.
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  5. #5
    Registered User
    Join Date
    03-26-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Extract number that comes before a certain word in an alphanumeric cell

    Quote Originally Posted by abousetta View Post
    Using your example, if all the numbers are three digits, you can simply use this formula

    Please Login or Register  to view this content.
    Thank you for the reply.

    Any hint on if the number is not always 3 digits?

    Cheers.

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Extract number that comes before a certain word in an alphanumeric cell

    Hi

    Pls, give a try to this.

    =LOOKUP(10^5;MID(E2;FIND("Trips";E2)-{1;2;3;4;5};{1;2;3;4;5})+0)

    Note: Change the semi-colons to gomma, if you have to do this.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

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

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  7. #7
    Registered User
    Join Date
    03-26-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Extract number that comes before a certain word in an alphanumeric cell

    Thank you muchly. It works.

+ 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