+ Reply to Thread
Results 1 to 3 of 3

How to return the first instance of a specific name in body of text, paragraph, etc

  1. #1
    Registered User
    Join Date
    06-18-2020
    Location
    Arizona
    MS-Off Ver
    Office 365
    Posts
    75

    How to return the first instance of a specific name in body of text, paragraph, etc

    I am using excel to search the body of text to find the the name of the person who most recently replied in an email thread. In some cases the thread may have responses from multiple people. This would mean extracting the most recent name in the text which would appear towards the top.

    Currently I've been using IFS() to search the body of text for a predetermined list of names. However, IFS() evaluates the conditionals sequentially and may return a TRUE result for the first match it finds, not necessarily the most recently mentioned.

    In the example file, I have included 3 rows of examples with random bodies of HTML text, with the table of names to the right. The 'NAME' column is where the first appearance of any of the names would be returned.
    Attached Files Attached Files
    Last edited by cph020283; 11-03-2021 at 09:50 AM.

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: How to return the first instance of a specific name in body of text, paragraph, etc

    If I can have a helper column with this formula:

    Please Login or Register  to view this content.
    Then I could perhaps use this:

    Please Login or Register  to view this content.
    If I can't have a helper column then it's pretty ugly:

    Please Login or Register  to view this content.
    See attached.

    WBD
    Attached Files Attached Files
    Office 365 on Windows 11, looking for rep!

  3. #3
    Registered User
    Join Date
    06-18-2020
    Location
    Arizona
    MS-Off Ver
    Office 365
    Posts
    75

    Re: How to return the first instance of a specific name in body of text, paragraph, etc

    That was quick. Brilliant! And was a learning experience for me too as dividing out by the helper column helped me understand how you came up with that. Totally can apply the principles used here in the future. Thank you!!! I love this forum.

+ 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 After The Last Instance Of A Specific Character
    By bjnockle in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-22-2020, 06:45 PM
  2. Return paragraph number based on found text
    By scienceguyroy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-27-2020, 01:36 PM
  3. Return all data from a row that contains a specific instance
    By Jason24 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-17-2015, 11:17 AM
  4. Add to Excel from Outlook when a email body contain a specific text
    By mathewfer in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 05-08-2013, 08:28 AM
  5. toolbar button to add paragraph of text and open attachment dialog in specific folder
    By wotadude in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2009, 05:00 PM
  6. Replies: 8
    Last Post: 11-07-2008, 09:26 AM
  7. Search for first instance of text & return the value
    By LisaChica in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-14-2006, 01:10 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