+ Reply to Thread
Results 1 to 6 of 6

Search Range of Cells for Text string and return latest Date

  1. #1
    Registered User
    Join Date
    12-11-2018
    Location
    New Zealand
    MS-Off Ver
    2016
    Posts
    3

    Search Range of Cells for Text string and return latest Date

    I would like a Formula to display the Date from the corresponding row where the following conditions are met;

    Search for Cell within Column B (Animal) for text string "cat" (multiple strings exist within each cell) + Column A (Type) is "car" = display most recent date

    Desired result is Highlighted

    I have tried Formulas such as ISNUMBER, MID without success.

    Any help most appreciated.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by ajlogan; 12-15-2018 at 12:22 AM.

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Search Range of Cells for Text string and return latest Date

    Try below formula
    =LOOKUP(2,1/SEARCH(TRIM(SUBSTITUTE($A$7,""""," * ")),$A$2:$A$5&" + "&$B$2:$B$5&" "),$C$2:$C$5)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Search Range of Cells for Text string and return latest Date

    Shorter version of Samba's formula

    =LOOKUP(1,-SEARCH(SUBSTITUTE(A7,"""","*"),A2:A5&" + "&B2:B5),C2:C5)

  4. #4
    Registered User
    Join Date
    12-11-2018
    Location
    New Zealand
    MS-Off Ver
    2016
    Posts
    3

    Re: Search Range of Cells for Text string and return latest Date

    Thank you for your suggestions. They both work well but a small change required.
    The required criteria (A7 - Type and Animal) each need to be hard coded into the formula without reference to a specific cell for the criteria (A7).
    for example Search for "car" & "cat" both embedded within the formula.

    Kind regards

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Search Range of Cells for Text string and return latest Date

    Try this

    =LOOKUP(1,-SEARCH("car*cat",A2:A5&B2:B5),C2:C5)

  6. #6
    Registered User
    Join Date
    12-11-2018
    Location
    New Zealand
    MS-Off Ver
    2016
    Posts
    3

    Re: Search Range of Cells for Text string and return latest Date

    Worked perfectly - Thanks great work!

+ 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. Replies: 2
    Last Post: 05-14-2015, 01:30 PM
  2. Replies: 8
    Last Post: 04-08-2015, 10:10 PM
  3. [SOLVED] IF range of cells contains string of text, return contents of cell where string is found
    By nobodyukno in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-03-2013, 09:56 AM
  4. Replies: 3
    Last Post: 10-03-2012, 03:09 AM
  5. [SOLVED] Search Range and Return # of times a Text String occurs
    By Schwartz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-02-2012, 04:23 PM
  6. Replies: 5
    Last Post: 03-08-2012, 01:50 AM
  7. Search text string for range of text values - return match
    By crugg in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-03-2010, 09:55 AM

Tags for this Thread

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