+ Reply to Thread
Results 1 to 4 of 4

Extract Values between two Text Strings, MULTIPLE condition

  1. #1
    Forum Contributor
    Join Date
    09-20-2014
    Location
    India
    MS-Off Ver
    2013
    Posts
    275

    Exclamation Extract Values between two Text Strings, MULTIPLE condition

    Dear all,

    Please review the attached file.
    I want to extract the values between text "SEE" "IN" or "SEE" "ON" together..
    I have function in column B:B to extract the values between text "SEE" "IN" . Is possible to extend it for multiple conditions (to include "SEE" "ON")..?

    I need single function or VBA code to do both the work together.

    Plz help.

    Thanks
    Attached Files Attached Files

  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 Values between two Text Strings, MULTIPLE condition

    Not sure if I understood exactly what you need

    =MID(A1,FIND("SEE",A1),LOOKUP(10^308,FIND({"IN","ON"},A1))-FIND("SEE",A1)+2)

    Row\Col
    A
    B
    1
    Check information, SEE 1A2B BB3C IN database SEE 1A2B BB3C IN
    2
    Check information, SEE 1AVBB CCCCC IN database SEE 1AVBB CCCCC IN
    3
    Check information, SEE 1AVBB CCCCC IN database SEE 1AVBB CCCCC IN
    4
    Check information, SEE 1AVBB CCCCC IN database SEE 1AVBB CCCCC IN
    5
    Check information, SEE XXX VVVV IN database SEE XXX VVVV IN
    6
    Check information, SEE XXX VVVV IN database SEE XXX VVVV IN
    7
    Check information, SEE XXX VVVV IN database SEE XXX VVVV IN
    8
    Check information, SEE XXX VVVV IN database SEE XXX VVVV IN
    9
    Check information, SEE BBBBB CCCC ON database SEE BBBBB CCCC ON
    10
    Check information, SEE BBBBB CCCC ON database SEE BBBBB CCCC ON
    11
    Check information, SEE BBBBB CCCC ON database SEE BBBBB CCCC ON
    12
    Check information, SEE BBBBB CCCC ON database SEE BBBBB CCCC ON
    13
    Check information, SEE 11111 222C ON database SEE 11111 222C ON
    14
    Check information, SEE B33B 444C ON database SEE B33B 444C ON
    15
    Check information, SEE B33B 444C ON database SEE B33B 444C ON


    Is this something you can work with?
    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 Contributor
    Join Date
    09-20-2014
    Location
    India
    MS-Off Ver
    2013
    Posts
    275

    Re: Extract Values between two Text Strings, MULTIPLE condition

    I need to extract the text between SEE to IN and SEE to ON...
    I mean, the ouput must be
    1A2B BB3C
    1AVBB CCCCC ...so on...

    And whats that 10^308 in your function..? Can you please explain it...?

    Please revise your function..
    Thanks for your help..
    Last edited by mchilapur; 01-28-2015 at 12:43 AM.

  4. #4
    Forum Contributor
    Join Date
    09-20-2014
    Location
    India
    MS-Off Ver
    2013
    Posts
    275

    Re: Extract Values between two Text Strings, MULTIPLE condition

    =MID(A2,SEARCH(" SEE ",A2,1)+4,LOOKUP(10^308,(SEARCH({" IN "," ON "},A2,1))-(SEARCH(" SEE ",A2,1)+4)))
    This works fine for me...Thanks..

+ 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. extract multiple pieces of text between two strings
    By verbatim in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-11-2014, 04:42 PM
  2. [SOLVED] Need to extract text from within multiple strings and arrange it in a single column
    By sampflederer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-10-2013, 01:35 PM
  3. Replies: 3
    Last Post: 02-25-2013, 08:11 AM
  4. Replies: 1
    Last Post: 12-20-2012, 04:18 PM
  5. 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

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