+ Reply to Thread
Results 1 to 12 of 12

Help on lookup to pull most recent value based on most recent date

  1. #1
    Registered User
    Join Date
    06-20-2013
    Location
    Atlanta, GA
    MS-Off Ver
    365
    Posts
    26

    Help on lookup to pull most recent value based on most recent date

    Hi All,

    I have an audit table that records the change to an account's information. I need to look up the most recent datetime and street address for the account only when the street_updated column is True and look it up by the cust_id.
    In the example dataset below, I would expect my lookup output to be
    cust_id: ABC1
    datetime : 4/3/24 6:22 PM
    street: 123 Forest

    cust_id: ABC2
    datetime : 4/3/24 6:22 PM
    street: 789 Forest


    Screenshot 2024-04-25 at 6.11.00 PM.png
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by cwwazy; 04-25-2024 at 10:42 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,510

    Re: Help on lookup to pull most recent value based on most recent date

    If, by any chance, you have updated to 365, you can use:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    06-20-2013
    Location
    Atlanta, GA
    MS-Off Ver
    365
    Posts
    26

    Re: Help on lookup to pull most recent value based on most recent date

    Hi TMS,

    Thanks so much for answering! This formula works, but I missed some more details in my original question. How would the formula change if I wanted to perform a kind of xlookup by cust_id? I have updated my question details.

    Thanks!

  4. #4
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,469

    Re: Help on lookup to pull most recent value based on most recent date

    Hi cwwazy I think you are probably using Office 365 - please update your forum profile accordingly. Thanks.

    Cell F4 formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-20-2013
    Location
    Atlanta, GA
    MS-Off Ver
    365
    Posts
    26

    Re: Help on lookup to pull most recent value based on most recent date

    Hi wk9128,

    Thanks for the reminder and your reply! I have updated my version to 365 on my profile.

    Adding to your formula you provided, if I wanted to add the cust_id as a look up value in the formula, is that possible? Like for example, in my dataset, I would have say many cust_id records, but I am only interested in cust_id ABC1 and ABC2. If my cust_id's are in F4 and F5, how could it be referenced in the formula.

    Attachment 867250

  6. #6
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,469

    Re: Help on lookup to pull most recent value based on most recent date

    Hi cwwazy Invalid Attachment specified and a valid link

    Please read and refer to this link, how to upload attachments,follow mathod 2
    https://www.excelforum.com/the-water...his-forum.html

    Cell F11

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by wk9128; 04-25-2024 at 09:44 PM.

  7. #7
    Registered User
    Join Date
    06-20-2013
    Location
    Atlanta, GA
    MS-Off Ver
    365
    Posts
    26

    Re: Help on lookup to pull most recent value based on most recent date

    Hi wk9128,

    I have re-attached the excel file using method 2. It is " Sample dataset.xlsx‎ "
    Thanks!

  8. #8
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,469

    Re: Help on lookup to pull most recent value based on most recent date

    Quote Originally Posted by cwwazy View Post
    Hi wk9128,

    I have re-attached the excel file using method 2. It is " Sample dataset.xlsx‎ "
    Thanks!
    POST#6 formula

  9. #9
    Registered User
    Join Date
    06-20-2013
    Location
    Atlanta, GA
    MS-Off Ver
    365
    Posts
    26

    Re: Help on lookup to pull most recent value based on most recent date

    Quote Originally Posted by wk9128 View Post
    POST#6 formula
    Thanks wk9128! This worked for me!

  10. #10
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,469

    Re: Help on lookup to pull most recent value based on most recent date

    cwwazy You're Welcome. Glad to help . Thank You for the feedback and rep.

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,510

    Re: Help on lookup to pull most recent value based on most recent date

    You're welcome. Thanks for the rep.

  12. #12
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,759

    Re: Help on lookup to pull most recent value based on most recent date

    i have answered you new post - about this formula not working on large data set

    ALSO the full data is NOT the same as the sample data - for example column B is a number with decimals (and you are trying to match to an integer) and also its NOT alphanumeric as shown here

    column B is not an integer and so will not meet criteria
    Also the MAXIFS() will not work as it pulls out the maxvalue in the dataset , and not where it matches with column B
    anyway - a bit of a messy reply , as i replied and then found more things wrong as i went along - BUT its here

    https://www.excelforum.com/excel-for...ml#post5944552

    Just luck I think it worked on the NEW data set for a range up to row 23 - - as the maximum date for when I =TRUE also happened to match the criteria you used for B - coincidence i think in the first 23 rows on the new data sheet


    i will be offline from tomorrow for a week
    Last edited by etaf; 04-27-2024 at 04:53 AM.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

+ 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] Need formula to return most recent balance with most recent date with 1 criteria
    By thematrix05 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-27-2023, 04:50 PM
  2. Replies: 5
    Last Post: 08-21-2022, 11:28 AM
  3. Recent date, recent location
    By edg_r in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-14-2022, 01:20 PM
  4. [SOLVED] Lookup Based on Most Recent Date
    By andrewc in forum Excel General
    Replies: 2
    Last Post: 09-05-2019, 03:48 PM
  5. Replies: 2
    Last Post: 01-04-2016, 03:40 AM
  6. Help with Creating Formula to Pull Most Recent Date
    By golfer_ld in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-15-2015, 11:22 AM
  7. Pull data from web within date range or recent date
    By Tlandress in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 02-28-2013, 01:44 PM

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