+ Reply to Thread
Results 1 to 5 of 5

Look up Latest Dates from a Table Column based on substring contained in another column

  1. #1
    Registered User
    Join Date
    07-06-2014
    Location
    Philadelphia
    MS-Off Ver
    2016
    Posts
    12

    Look up Latest Dates from a Table Column based on substring contained in another column

    Hi,

    I could use some help with looking up latest date from an Excel Table based on one of its column containing specific substrings. Refer to the attached Excel file for example and the screenshot below.

    I have three tables in the attached Excel File.

    Table1 - Two Columns - City & Date
    Table2 - Single Column - City Choices
    Table3 - Latest Date Pulled using Calculation


    I am trying to pull latest date from a Table1, Column2 (Date) based on value in its first column (City) containing the substring in Table 2 (City Choices)

    Ex. Since I have NYC and PHL included in Table 2, my latest date is 6-Jul-2019. If I were to remove PHL, then the latest date should change to 5-May-2019.

    I'd appreciate the help, Let me know if there are any questions. I made multiple attempts but having my data in a table is making it difficult for me.

    LookupBasedOnSubstring.jpg

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

    Re: Look up Latest Dates from a Table Column based on substring contained in another colum

    Please try at D2
    =MAX(Table1[Date]*ISNUMBER(FIND(TRANSPOSE(Table2[City Choices]),Table1[City]))*TRANSPOSE(Table2[City Choices]>0))

    Press Ctrl+Shift+Enter

  3. #3
    Registered User
    Join Date
    07-06-2014
    Location
    Philadelphia
    MS-Off Ver
    2016
    Posts
    12

    Re: Look up Latest Dates from a Table Column based on substring contained in another colum

    Thanks Bo_Ry, thanks for your quick reply. This works great. But I noticed that it didn't work in my actual application because the Date column in my application is a calculation and sometimes the calculation returns a value that is NOT a date and is a text instead and because of that, I get get a #Value! in D2. Is there a way to filter out values other than Date?

    I have attached a revised file to indicate the issue. Sorry, I didn't think of providing this information earlier..

    Thanks in advance,

    Nick.
    Last edited by daninikunj; 10-28-2019 at 04:02 PM.

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

    Re: Look up Latest Dates from a Table Column based on substring contained in another colum

    Please try at D2
    =MAX(N(+Table1[Date])*ISNUMBER(FIND(TRANSPOSE(Table2[City Choices]),Table1[City]))*TRANSPOSE(Table2[City Choices]>0))

    Press Ctrl+Shift+Enter

  5. #5
    Registered User
    Join Date
    07-06-2014
    Location
    Philadelphia
    MS-Off Ver
    2016
    Posts
    12

    Re: Look up Latest Dates from a Table Column based on substring contained in another colum

    Hi Bo_Ry.. The revised formula worked. Thanks so much. Appreciate your help and quick response!

+ 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. VBA- Filter Pivot table based on latest and 2nd latest date in column
    By ziyan89 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 12-29-2015, 11:18 AM
  2. [SOLVED] Select latest dates from column
    By bigband1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-26-2015, 10:01 AM
  3. [SOLVED] Require a formula to indicate the latest dates in a column
    By john dalton in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-11-2015, 04:16 AM
  4. [SOLVED] Finding the latest and oldest dates in a filtered column.
    By skyping in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-04-2015, 05:35 PM
  5. Count of Dates Contained in an Entire Column
    By gpzbc in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-03-2013, 02:54 PM
  6. [SOLVED] VLOOKUP based on a substring in cell to be searched in column
    By Ekser in forum Excel General
    Replies: 7
    Last Post: 04-13-2012, 07:23 AM
  7. Replies: 3
    Last Post: 08-11-2009, 11:46 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