+ Reply to Thread
Results 1 to 6 of 6

Pulling out the text between two different characters with DIFFERENT positions

  1. #1
    Registered User
    Join Date
    02-12-2016
    Location
    New York
    MS-Off Ver
    2010
    Posts
    5

    Pulling out the text between two different characters with DIFFERENT positions

    I have a challenging one for the experts out there.

    I have the following in Column B:

    <p class="tagline">President</p>
    <h3 class="title">John Merrrrino</h3>
    <p class="tagline">Managing Partner</p>
    <h3 class="title">Nick Smith</h3>
    <p class="tagline">Managing Director</p>
    <h3 class="title">Matt smith</h3>
    <p class="tagline">Managing Director / Chief of Staff</p>

    What I need to do is pulling out the text between > and < (title and name)

    Here is the difficulty

    I need it to find the SECOND occurrence of the ">" and the first occurrence of "<"

    The outcome should be:

    President
    Jon Merrino
    Managing Partner
    Nick Smith
    etc


    Secondary challenge is that the strings aren't the same length because </p> and </h3> are different length.

    Thoughts?

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Pulling out the text between two different characters with DIFFERENT positions

    Try this...

    Data Range
    B
    C
    1
    <p class="tagline">President</p>
    President
    2
    <h3 class="title">John Merrrrino</h3>
    John Merrrrino
    3
    <p class="tagline">Managing Partner</p>
    Managing Partner
    4
    <h3 class="title">Nick Smith</h3>
    Nick Smith
    5
    <p class="tagline">Managing Director</p>
    Managing Director
    6
    <h3 class="title">Matt smith</h3>
    Matt smith
    7
    <p class="tagline">Managing Director / Chief of Staff</p>
    Managing Director / Chief of Staff


    This formula entered in C1 and copied down:

    =MID(B1,FIND(">",B1)+1,FIND("</",B1)-1-FIND(">",B1))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Pulling out the text between two different characters with DIFFERENT positions

    Or try
    =MID(B18,FIND(">",B1)+1,FIND("<",B1,FIND(">",B1))-FIND(">",B1)-1)

  4. #4
    Registered User
    Join Date
    02-12-2016
    Location
    New York
    MS-Off Ver
    2010
    Posts
    5

    Re: Pulling out the text between two different characters with DIFFERENT positions

    That's perfect. I was overthinking that completely

    Thank you! Both of you

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Pulling out the text between two different characters with DIFFERENT positions

    You're welcome. We appreciate the feedback!

    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

  6. #6
    Registered User
    Join Date
    02-12-2016
    Location
    New York
    MS-Off Ver
    2010
    Posts
    5

    Re: Pulling out the text between two different characters with DIFFERENT positions

    Curious as to why either formula works perfecting and what the differences are.

    Thanks Jose & Tony

+ 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. Remove Text characters, leaving numerical characters
    By aschwalge in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-01-2016, 06:42 PM
  2. Lookup formula for multiple values including specific text positions
    By gabrielhuman in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-18-2015, 12:43 AM
  3. Replies: 3
    Last Post: 03-11-2015, 03:25 PM
  4. Replies: 4
    Last Post: 08-15-2013, 09:50 AM
  5. [SOLVED] Numerical values (in variable positions) associated to text cells
    By eloureiro in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-02-2012, 07:02 PM
  6. Replies: 6
    Last Post: 05-21-2012, 04:07 PM
  7. Pulling out specific characters
    By Louis in forum Excel General
    Replies: 4
    Last Post: 04-22-2005, 06: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