LookupAdvanced

Find the last matching row, not the first

Use a reverse search to return the final recorded status for a repeated ticket, then check when the last row also means the latest date.

The data

Row numberABC
1DateTicketStatus
22026-01-04T-88Open
32026-01-09T-88In progress
42026-02-02T-91Open
52026-02-18T-88Closed
62026-03-01T-91Closed

Paste into A1 on a blank worksheet and keep the supplied row order. This lookup matches ticket text and returns a status; it does not calculate from the date column. Input formulas use English function names and comma separators.

Your task

Ticket T-88 appears three times. The log is ordered by date from oldest to newest. Put a formula in F2 that returns the status in its last matching row, which is also its most recent status in this ordered log.

Your formula goes in F2

The checker compares your formula against the accepted answers — it does not run it. The expected result is shown with the solution so you can verify it in your own spreadsheet.

Why this is the right formula

The sixth argument is search_mode: -1 searches from the bottom up. The fifth argument is match_mode: 0 keeps an exact ticket match. The fourth argument, if_not_found, is omitted in the first formula. Here a default first-to-last search returns Open from row 2; reverse search returns Closed from row 5. XLOOKUP does not compare the dates in column A. Closed is the most recent status only because these complete rows are ordered from oldest to newest. If the rows are rearranged, the last match can be an older status: check the date order before treating last as latest, and keep each ticket, date and status together when sorting. The accepted LOOKUP form returns the last matching row in this example too. XLOOKUP is unavailable in Excel 2016 and Excel 2019.

Documentation

Documentation reviewed . This is a source review, not an Excel execution test.

Try next

Practise it on a full dataset

Use this on your own site

Free to use, share and republish — including commercially. Attribution isn't required, but it's what keeps these free to make, and there's one ready to paste below.

Cite it

Questions

Does this actually run my formula?

The checker normalises case, spaces, argument separators and dollar-sign anchors, then compares your formula with a reviewed list of accepted answers. It does not evaluate the formula. Copy the data into your spreadsheet to verify the expected result independently.

Can a correct formula be rejected?

Yes. The accepted list includes several reviewed approaches, but cannot recognise every equivalent formula. Compare an unlisted solution with the expected result in your spreadsheet and use the page feedback if an accepted answer is missing.

Do I need an account?

No. There is no signup, no progress tracking and nothing stored — everything happens in your browser.