• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Pull data from most recent of record with same values

Hayley

Member
I know that title made no sense...sorry.

I have a spreadsheet that shows trips booked by customers. Customers are identified by a customer number and each trip shows trip number, customer number, booking date, and location. For each unique customer number, I want to show the location of the most recent booking. I can't figure out how to pull that information.

How do I do a formula that identifies the most recent one and then only pulls the location for that one?

Thanks much!
 
Here's the sample. I highlighted the ones where there are multiples of the same customer number and the highlighted ones are the ones I would want, because they are the travel center for the most recent booking. So if I dedupe the customer numbers (P#), I want to then only show the recent one.
 

Attachments

  • sample.xlsx
    8.6 KB · Views: 5
Please use the below array formula

INDEX($D$2:$D$15,MATCH(MAX(--($C$2:$C$15=C2)*($B$2:$B$15)),--($C$2:$C$15=C2)*($B$2:$B$15),0))

Press Ctrl+Shift+Enter after entering the formula.
 

Attachments

  • sample.xlsx
    9.5 KB · Views: 9
Back
Top