+ Reply to Thread
Results 1 to 5 of 5

Pulling specific word from document name

  1. #1
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Wisbech England
    MS-Off Ver
    Excel 2010
    Posts
    308

    Pulling specific word from document name

    Hi Everyone
    Does someone know the formula that extracts a specific word from the sentence??
    I have a file index in my workbook (example) "WOPR2230 Operating X-ray scanner v3 14032014","WOPR2231 Operating volume scanner v2 14032014" I would like to extract only v and the number attached to it...

    Thanks a lot for all help
    Dan

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Pulling specific word from document name

    Not sure how many numbers you will have after the "v", but try this, it will pull out up to v9...
    =MID(A1,SEARCH(" v? ",A1,1)+1,3)0

    edit: this will go up to v99...
    =MID(A1,IFERROR(SEARCH(" v? ",A1,1),SEARCH(" v?? ",A1,1))+1,3)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Pulling specific word from document name

    Very similar to Ford's suggestion, but this should find any length number attached to the "v"

    =TRIM(MID(SUBSTITUTE(A2," ", REPT(" ",20)), FIND(" v", SUBSTITUTE(A2," ", REPT(" ",20))), 20))

    And if there's a chance the "v" word would be missing:

    =IFERROR(TRIM(MID(SUBSTITUTE(A2," ", REPT(" ",20)), FIND(" v", SUBSTITUTE(A2," ", REPT(" ",20))), 20)), "none")
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Pulling specific word from document name

    Jerry, that doesnt work for the 2nd sample (contains a word with "v" - volumne)

  5. #5
    Forum Contributor
    Join Date
    08-29-2011
    Location
    Wisbech England
    MS-Off Ver
    Excel 2010
    Posts
    308

    Re: Pulling specific word from document name

    Hi Everyone :-)
    I just want to quickly thatnk each one of you for taking time to help me with it.
    All of your solutions working well and I will choose one that suits my project best.
    Once again Thank you
    Dan

+ 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] Remove a specific word line from a word document.
    By Will_2013 in forum Word Formatting & General
    Replies: 4
    Last Post: 05-26-2013, 07:01 PM
  2. pulling specific text from a notepad document
    By smoosh1011 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2009, 05:10 PM
  3. Pulling data from a sheet into Word in a specific order
    By schallpattern in forum Excel General
    Replies: 0
    Last Post: 06-09-2009, 03:29 PM
  4. [SOLVED] How to hyperlink to a specific location in a Word document?
    By DEVAR in forum Excel General
    Replies: 6
    Last Post: 08-04-2006, 01:50 PM
  5. [SOLVED] Data to a specific location into a word document
    By Adam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-08-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