4.7 XLOOKUP Match Modes, Search Modes and Multiple Returns
A lookup needs two decisions: which values qualify as a match, and how Excel should search for them. These decisions live in different XLOOKUP arguments. Once you separate them, you can retrieve a last recorded order, apply a threshold, search a text pattern or return several fields without confusing one task with another.
We use fictional customer orders, parcel scans, products and delivery-price examples. The familiar shopping and courier contexts explain the business questions; they are not records or policies from an actual company. Every formula below has a stated source and an expected result you can check independently.
1. Separate matching rules from search rules
Read the full argument order
=XLOOKUP(lookup_value,lookup_array,return_array,[if_not_found],[match_mode],[search_mode])
The first three arguments identify the requested value, the source list to search and the aligned results to return. The fourth supplies an optional missing-result value. The fifth changes the matching rule. The sixth changes the search method or direction. Optional arguments still occupy positions even when you leave one blank.
For a basic exact lookup, you can stop after the first three arguments. For a reverse exact lookup with a visible fallback, supply all six. Reading the complete expression aloud helps: search for this customer, search this customer list, return this amount list, show this message when absent, require an exact match, and start from the end.
| Argument | Value | Purpose |
|---|---|---|
| match_mode | 0 | Exact match; the default |
| match_mode | -1 | Exact match, otherwise next smaller lookup value |
| match_mode | 1 | Exact match, otherwise next larger lookup value |
| match_mode | 2 | Match a wildcard text pattern |
| search_mode | 1 | Search first to last; the default |
| search_mode | -1 | Search last to first |
| search_mode | 2 | Binary search on ascending sorted lookup values |
| search_mode | -2 | Binary search on descending sorted lookup values |
The same number can mean different things in different positions. A minus one in the fifth argument selects the next-smaller matching rule; a minus one in the sixth starts at the end. A two in the fifth means wildcard matching; a two in the sixth means ascending binary search. Always connect an option with its argument name.
- Choose the matching rule from the question you are answering.
- Choose the search rule from the source structure and ordering.
- Keep lookup and return records aligned.
- Define missing-result behaviour separately.
- Test cases that distinguish the chosen rule from other plausible rules.
- Avoid changing options merely to make an unwanted error disappear.
2. Prepare the four-order example
Keep the original practice data consistent
Create a worksheet named Data and enter the following table in A1:C5. Each data row represents one fictional order. These are the dates used by the original Task Hub exercise; the earlier article used slightly different display dates. This version uses the Task Hub dates consistently so both the amount and date answers agree.
| Date | Customer | Amount |
|---|---|---|
| 2 November 2026 | Zoya | 120 |
| 3 November 2026 | Amir | 300 |
| 5 November 2026 | Zoya | 450 |
| 7 November 2026 | Ravina | 180 |
To create genuine dates regardless of whether your local date-entry convention is day-first or month-first, use =DATE(2026,11,2) in A2, then corresponding DATE formulas with days 3, 5 and 7 in A3:A5. Apply a readable date format afterward. Enter the Amount values as numbers. The displayed dates are not simply text labels that happen to look chronological.
Put Customer to find in E1 and Zoya in F1. Put First amount in E2, Last amount in E3 and Last date in E4. Reserve F2:F4 for formulas. The source has two Zoya rows because one customer can place several orders. That repetition is valid for this event list; it would have a different meaning in a directory intended to contain one row per customer.
Check the source before searching it
- There are four orders and three displayed customer names.
- Zoya appears in two orders, with amounts 120 and 450.
- Amir appears once, with amount 300.
- Ravina appears once, with amount 180.
- The four amounts total 1050.
- Zoya's two amounts total 570, which is different from either individual order amount.
Names are convenient for this tiny demonstration. A real order system should usually connect records through a stable customer identifier because different people can share a name. Reverse search on a common name could otherwise retrieve someone else's order while appearing technically successful.
3. Compare first and last physical matches
Retrieve the first amount
Enter the first formula in F2. With default exact matching and default first-to-last search, XLOOKUP finds Zoya at the first source occurrence and returns 120. It does not add the two Zoya orders or compare their dates.
=XLOOKUP(F1,$B$2:$B$5,$C$2:$C$5,"No order")
Retrieve the last amount
Enter the second formula in F3. The fifth argument zero keeps exact matching. The sixth argument minus one begins the search at the end of the supplied list. The final Zoya occurrence is the 5 November row, so the result is 450.
=XLOOKUP(F1,$B$2:$B$5,$C$2:$C$5,"No order",0,-1)
The formula works upward through the list until it finds a matching customer. In this source, the last physical Zoya row also happens to be the latest Zoya order because the complete records are arranged oldest first. That chronological interpretation belongs to the source order, not to a built-in date rule in XLOOKUP.
You may see formulas with two adjacent commas before the matching option. They leave the optional missing-result argument omitted while preserving the positions of later arguments. For a beginner report, the explicit No order message makes the behaviour easier to understand. Do not remove a comma and accidentally move the search option into the matching position.
Return the date of the same occurrence
In F4, change only the return range to the date field. Keep the same customer input, exact rule and reverse search. The result is 5 November 2026. If you see 46331 in a workbook using the standard 1900 date system, apply a date format; the underlying serial number represents the returned date.
=XLOOKUP(F1,$B$2:$B$5,$A$2:$A$5,"No order",0,-1)
Changing a number format does not repair a text date or choose a newer record. The first check is whether the source contains genuine dates and whether the selected record is the intended one. Format the result only after its meaning is correct.
4. Lab 1 — expose the difference between last and latest
Verify the original answers
| Request | First amount | Last amount | Last date |
|---|---|---|---|
| Zoya | 120 | 450 | 5 November 2026 |
| Amir | 300 | 300 | 3 November 2026 |
| Ravina | 180 | 180 | 7 November 2026 |
| Raja | No order | No order | No order |
- Build the three report formulas and verify Zoya's original results.
- Change F1 to Amir and compare the first and last amounts.
- Change F1 to Raja and confirm that the unresolved request remains visible.
- Restore Zoya and record the original amount and date outputs.
- Save an experiment copy before adding the late-arriving historical row below.
- Keep the original source available so you can return to the Task Hub fixture afterward.
Append an older event at the bottom
In the experiment copy, enter a fifth order in A6:C6: 1 November 2026, Zoya, 90. Use DATE to create its actual date value. This row represents an older order that arrived in the export late. Extend the formulas' lookup and return ranges through row 6.
The reverse lookup now returns 90 and 1 November 2026. Those are the last physical matching row's values. They are not Zoya's latest order in time; the 5 November order for 450 is still later. The five-row source total is 1140 and Zoya's three-order total is 660.
Restore a meaningful chronological order
Sort the entire A1:C6 record block by Date ascending, including the correct header treatment. Do not sort the Date column by itself. After the full records are ordered, the first Zoya amount becomes 90 and the last becomes 450. The source totals remain 1140 overall and 660 for Zoya because sorting changes order, not membership or amounts.
This is a useful independent test: a chronological sort should alter which matching record is encountered first or last, while preserving each date-customer-amount relationship and the totals. If only one column is sorted, the totals may still look correct even though the records have been corrupted.
If two orders have the same displayed date, a date-only sort may not define which one happened later. Use a genuine timestamp and, when necessary, a stable event sequence or order identifier with a documented tie rule. A row's position should reflect an intentional business ordering rather than whichever file happened to be pasted last.
5. Lab 2 — retrieve a parcel's recorded status
Prepare a complete scan history
Create a worksheet named Tracking and enter this table in A1:C6. Each row is one invented parcel scan, not one parcel. Repeated tracking numbers are expected because the same parcel is scanned at several stages. The AWB label is a familiar logistics term for the shipment identifier in this example.
| Date | AWB No | Status |
|---|---|---|
| 10 November 2026 | AWB-7001 | Picked up |
| 10 November 2026 | AWB-7002 | Picked up |
| 11 November 2026 | AWB-7001 | In transit |
| 12 November 2026 | AWB-7001 | Delivered |
| 12 November 2026 | AWB-7002 | In transit |
Create the dates using DATE with the stated year, month and days. Put AWB to find in E1 and AWB-7001 in F1. Put First status, Last status and Last scan date in E2:E4. Enter the following formulas in F2:F4 respectively.
=XLOOKUP(F1,$B$2:$B$6,$C$2:$C$6,"No scan yet")
=XLOOKUP(F1,$B$2:$B$6,$C$2:$C$6,"No scan yet",0,-1)
=XLOOKUP(F1,$B$2:$B$6,$A$2:$A$6,"No scan yet",0,-1)
For AWB-7001, expect Picked up, Delivered and 12 November 2026. The date serial is 46338 in the standard 1900 date system. For AWB-7002, expect Picked up, In transit and 12 November 2026. For AWB-7009, all three formulas show No scan yet in this dataset.
- Confirm five event rows and two distinct parcel IDs in the source.
- Check that AWB-7001 has three recorded scans and AWB-7002 has two.
- Run the report for both known parcels and the unknown parcel.
- Verify each returned status and date against the same complete source record.
- In an experiment copy, append an older scan for AWB-7001 dated 9 November 2026 with status Label created.
- Extend both formula ranges and observe that reverse search now returns Label created.
- Explain why that result is the last row but not the latest scan by date.
- Sort complete records chronologically and confirm the last AWB-7001 status returns to Delivered.
Keep the wording faithful to the source
The phrase last recorded status is more precise than a guaranteed live parcel status. The workbook can only report events present in its source extract. A delayed feed, an incomplete export or a later event not yet imported can make the workbook older than the courier system. State the extract time when such freshness matters.
No scan yet is a friendly exercise message, but technically it means no matching scan exists in the included source. It does not prove the parcel never existed or was never scanned elsewhere. If the business needs a stronger claim, the source and validation process must support that claim.
6. Search a text pattern deliberately
Distinguish literal text from a pattern
A product search may ask for the first product whose description contains Grapes. That is different from asking for a product whose entire description equals Grapes. Wildcards let a search expression describe a family of strings. In XLOOKUP, choose match mode two when that pattern behaviour is intended.
Create a worksheet named Products with Product ID and Description in A1:B1. Enter the following four records in rows two through five. Keep their order as shown for the first exercise, because first and last pattern matches depend on this order.
| Product ID | Description |
|---|---|
| P-101 | Green Grapes 500g |
| P-102 | Apples 1kg |
| P-103 | Black Grapes 500g |
| P-104 | Grape Juice 1L |
=XLOOKUP("*Grapes*",$B$2:$B$5,$A$2:$A$5,"No product",2)
The asterisks permit any sequence of characters before and after Grapes. The first qualifying description is Green Grapes 500g, so the formula returns P-101. Grape Juice does not contain the complete word fragment Grapes and therefore does not qualify for this particular pattern.
Without match mode two, the asterisks are part of the literal search text. The exact-mode formula would look for a description literally equal to *Grapes*, including those characters, and return No product in this sample. It does not automatically turn the expression into a contains search.
Use wildcard symbols with a clear purpose
- An asterisk represents a sequence of zero or more characters.
- A question mark represents one character.
- A tilde escapes a wildcard character when the literal symbol is needed.
- A pattern can match more than one source record.
- A single XLOOKUP still returns one selected match.
- Review the actual matching descriptions before relying on a broad pattern.
Add search mode minus one to the product formula and the answer becomes P-103, the last description containing Grapes. Both Green Grapes and Black Grapes qualify; the search direction decides which qualifying record is returned. Neither result is a list of all grape products.
=XLOOKUP("*Grapes*",$B$2:$B$5,$A$2:$A$5,"No product",2,-1)
To retrieve every matching product, use a filtering approach with an appropriate text condition rather than repeatedly assuming one lookup represents the entire catalogue. Be precise about singular and plural words, spelling variations and meaningful product attributes. A pattern match is a text rule, not a semantic understanding of product categories.
Practise a literal asterisk safely
In a separate scratch list, enter BOX-A1 in D2 and BOX-*1 in D3, with labels Standard pouch and Pattern pouch in E2:E3. An exact-mode search for the text BOX-*1 returns Pattern pouch because the asterisk is literal by default. A wildcard-mode search for the same expression can match BOX-A1 first and return Standard pouch.
In wildcard mode, search for BOX-~*1 to require the actual asterisk character. That escaped pattern returns Pattern pouch. This small contrast is worth practising because familiar VLOOKUP or MATCH wildcard behaviour can lead students to assume all lookup functions interpret the same text in the same way.
7. Choose a lower-bound or upper-bound rule
Start with the policy the values represent
Approximate matching should answer a defined band or capacity question. It should not be used to guess a nearby customer or parcel identifier. A next-smaller key can be meaningful when each key starts a price band; a next-larger key can be meaningful when each key is an upper capacity limit.
Create a worksheet named Fees. In A1:B4, enter the following fictional delivery rule. Each minimum begins a band and the stated fee applies to the whole order within that band. These numbers are invented teaching policy, not the pricing of a shopping app.
| Minimum order | Fee |
|---|---|
| 0 | 49 |
| 500 | 29 |
| 1000 | 0 |
Put Order value in D1 and 750 in E1. For a valid non-negative numeric order value, the next formula chooses an exact minimum if available; otherwise it chooses the next smaller minimum. The key selected for 750 is 500, so the returned fee is 29.
=XLOOKUP(E1,$A$2:$A$4,$B$2:$B$4,"Outside fee policy",-1)
Next smaller refers to the lookup value, not the return value. The returned fees happen to decrease as order values increase. You are not asking Excel for the smallest fee or the fee numerically closest to the order amount. You are asking which lower boundary contains that valid order value.
- An order value of zero uses the minimum-zero band and returns 49.
- A value of 499.99 remains below 500 and returns 49.
- A value of 500 matches the boundary and returns 29.
- A value of 999.99 remains below 1000 and returns 29.
- A value of 1000 matches the last boundary and returns 0.
- A value above 1000 uses the last band's fee 0 under this stated policy.
A negative order value is invalid for this particular model and needs a validation or review condition. Do not let a fallback message replace the underlying business input rules. Likewise, decide how returns, credits or cancelled orders should be handled before applying a delivery fee to a real export.
Use upper boundaries for a different question
In a separate block on Fees, put Maximum kg and Charge in G1:H1. Enter limits 1, 3, 5 in G2:G4 and corresponding charges 50, 90, 130 in H2:H4. This second teaching rule charges by the smallest listed capacity that can contain a positive package weight. Put Package kg in J1 and 2 in K1.
=XLOOKUP(K1,$G$2:$G$4,$H$2:$H$4,"No listed capacity",1)
A two-kilogram package needs the next larger listed limit, three kilograms, so the charge is 90. Exactly three kilograms also returns 90. A weight of 3.01 needs the five-kilogram band and returns 130. A weight above five has no suitable listed capacity and should remain unresolved rather than being charged at the largest available band by assumption.
The opposite approximate rule would answer a different question. Next-smaller matching for a two-kilogram package would choose the one-kilogram limit, which cannot contain the package under this policy. Before memorising minus one or plus one, explain whether the keys are lower starting points or upper allowed limits.
Test the boundary, not just a comfortable middle value
For both policies, check a value just below each boundary, exactly at it and just above it. Also check the lowest valid input and an out-of-domain input. A formula that succeeds for 750 does not prove it treats 500 and 1000 correctly. Boundary checks connect the Excel option with the intended business rule.
Keep these policy tables sorted and documented so a person can inspect the bands easily. Ordinary first-to-last approximate XLOOKUP does not have the same binary-sort requirement as the binary modes below, but an orderly, unique threshold list is still easier to review. Duplicate thresholds with conflicting fees are a policy defect that a search direction should not silently resolve.
8. Understand binary search before selecting it
Binary search depends on an ordered lookup field
A linear search works through the supplied list from one end. A binary search uses the ordering of values to narrow the search region repeatedly. That can reduce the search work for a large ordered list, but it depends on the exact lookup field being sorted as required. A list sorted by another column does not satisfy that condition.
Search mode two requires ascending lookup values. Search mode minus two requires descending lookup values. The return values must stay attached to their corresponding lookup records during the sort. Sorting only the keys can produce a correctly found key paired with the wrong result.
=XLOOKUP(E1,$A$2:$A$4,$B$2:$B$4,"Outside fee policy",-1,2)
This formula uses the ascending Fees lower-bound list. It combines next-smaller matching with ascending binary search. For 750 it should still return 29. The matching rule and search method remain separate choices even though both affect the formula's behaviour.
Do not use binary mode on unsorted input and expect a helpful warning. Microsoft documents that unsorted lookup values can produce invalid results. The exact wrong answer is not a reliable teaching contract, so do not build a lesson around one accidental result from a particular unsorted arrangement.
Choose maintainability as well as speed
- Use binary search only when the lookup-field ordering is guaranteed and maintained.
- Verify both the beginning and end of the sorted source.
- Keep lookup and return fields together during sorting.
- Use clear duplicate-key rules rather than relying on an unspecified first or last duplicate outcome.
- Retest after imports, appends and source changes.
- Measure a real large-workbook problem before promising a universal performance improvement.
For a three-row teaching fee table, binary search offers no practical benefit worth complicating the beginner report. It is included here so you recognise the option and its prerequisite when you encounter it. The default linear search is often the clearer starting point for ordinary small lists.
9. Return several fields from one matched record
Give the return array more than one column
A store report often needs city, area and manager together. XLOOKUP can retrieve all three from the same matched record when its return array includes those aligned columns. This is multiple fields from one selected record, which is different from returning every record whose key matches.
Create a separate worksheet named StoreView and enter this complete compact directory in A1:D4. It is a smaller teaching copy of familiar course records, not the full seven-store source from the previous lesson. The headers and formula ranges below belong to this specific layout.
| Store ID | City | Area | Manager |
|---|---|---|---|
| BLK-NSK-01 | Nashik | College Road | Zoya |
| AMN-NGP-01 | Nagpur | Dharampeth | Amir |
| BLK-KOP-01 | Kolhapur | Rajarampuri | Rani |
Put Requested store in F1 and BLK-NSK-01 in G1. Put City, Area and Manager in G3:I3. Leave G4:I4 clear, then enter the following formula only in G4. It returns the three values Nashik, College Road and Zoya across G4:I4.
=XLOOKUP(G1,$A$2:$A$4,$B$2:$D$4,"Store not found")
G4 is the formula's anchor. The adjacent cells display the other returned fields as a spill. Do not copy the formula across all three cells; that would create overlapping output requests. To edit the expression, return to its anchor rather than attempting to edit an individual spilled value.
Check shape and available output space
The lookup field has three rows and the return array has the same three record rows, plus three output columns. That is a compatible shape for returning one matched row. The return array does not need to have only one column, but its record dimension must correspond to the lookup list.
Change G1 to AMN-NGP-01 and expect Nagpur, Dharampeth and Amir. Then try an absent store code. The supplied fallback is one text value, so do not assume every missing request will produce three labelled fallback fields. Design the report's empty-result presentation deliberately if a fixed output shape is required.
In an experiment copy, place a note in H4 before entering the lookup in G4. The occupied cell blocks the intended spill and can produce #SPILL!. Preserve the note by moving it to an appropriate place, then clear the actual obstruction and check again. Do not delete surrounding data blindly just to remove the error.
- Keep the spill output outside an Excel Table.
- An Excel Table may still provide the source records through structured references.
- Leave the complete intended output rectangle clear.
- Avoid merged cells across the spill area.
- Keep headings separate from the dynamic output values.
- Check the source and destination after adding more return fields.
Connect the pattern search with the store fields
On StoreView, try =XLOOKUP("*Road*",$C$2:$C$4,$A$2:$A$4,"No area",2). It searches the Area field and returns BLK-NSK-01 because College Road is the first matching area. The result is a store identifier, not the matching area text, because the return range is column A. Describe both the search field and returned field when explaining a pattern-based result.
If another area containing Road is added later, the same formula still returns only one qualifying store. It is therefore useful for a stated first-match exercise, but unsuitable as a complete report of every store on a road-named area. Source growth can change the meaning of a previously unique pattern without changing the formula itself.
Mini lab — return a delivery duration
Create a separate DeliveryLog worksheet with the following data in A1:C4. Each row represents one fictional completed delivery observation. The last field contains a numeric duration in minutes; it is not an Excel clock time or an amount in rupees. Enter the dates with DATE as in the earlier labs.
| Store ID | Date | Minutes |
|---|---|---|
| BLK-PUN-01 | 2 November 2026 | 30 |
| BLK-NSK-01 | 3 November 2026 | 25 |
| BLK-PUN-01 | 5 November 2026 | 22 |
In E2, enter =XLOOKUP("BLK-PUN-01",$A$2:$A$4,$C$2:$C$4,"No observation",0,-1). The answer is 22 minutes from the last matching observation. A first-to-last lookup returns 30. The two Pune observations total 52 minutes and average 26, but neither of those calculations is the question answered by the reverse lookup.
Temporarily change the final duration from 22 to 24. Predict the reverse result 24, the unchanged first result 30 and the revised two-observation average 27. Then restore 22. This simple edit checks that the report reads the intended record and preserves the difference between one event, a total and an average.
If the operational question asks for average delivery performance, use an appropriate aggregation over a clearly defined set of observations. A last observation cannot stand in for an average, and one store's latest event cannot establish the service level of an entire platform. Label the unit, the selected store and the observation date beside a single-value result.
10. Trace a reverse exact search
Read the original AWB-7001 history
Define the key and rule
The request is AWB-7001, matching is exact, and search starts at the end of the original five-event list.
Inspect the last source record
The final row belongs to AWB-7002. It does not match the requested identifier, so the search continues toward the start.
Find the last qualifying row
The next record is AWB-7001 with Delivered on 12 November 2026. This is the last physical exact match in the supplied source.
Check the time interpretation
The original records are chronologically ordered for this parcel, so the last match also represents its latest included scan. A late-arriving older row would invalidate that interpretation until the ordering is repaired.
Repeat the explanation after adding the historical Label created event from the lab. Describe what the function actually searches, then describe what the business question requires. Keeping those two sentences separate makes it easier to recognise when the data preparation needs to change.
11. Check the decisions with explained answers
1. A minus one appears in the fifth argument. Does that mean reverse search?
No. The fifth argument is match_mode, so minus one means exact match or next smaller lookup value. Reverse search requires minus one in the sixth argument. State the argument name along with its value to avoid confusing the two options.
2. A historical Zoya order for 90 is appended last. Which amount does reverse search return?
It returns 90 after the formula includes that row. The latest dated order is still 450 on 5 November. Reverse search follows physical source order; it does not calculate the maximum date. Sorting complete records chronologically restores the intended latest interpretation.
3. Does *Grapes* always act as a contains search in XLOOKUP?
No. It is a wildcard pattern only when wildcard match mode is selected. Exact mode treats the asterisks literally. In the stated product list, wildcard mode returns P-101 first or P-103 with reverse search; neither is the complete set of matching products.
4. Which fee does the lower-bound policy assign to exactly 500?
The exact 500 boundary returns 29. Just below 500, the zero minimum applies and returns 49. This difference is why a boundary check is more informative than testing only a middle value such as 750.
5. Can an unsorted binary lookup return a plausible wrong value?
Yes. Binary search depends on the specified ascending or descending ordering. Unsorted data can produce invalid results without a dependable error warning. Use binary mode only when the source order is maintained and verified.
6. A three-column return array gives three cells. Are these three matching records?
No. They are three fields from one selected record. In StoreView, Nashik, College Road and Zoya describe the same store. If the question asks for all matching stores, use a method designed to return multiple records.
12. Explain the choices in an interview
How would you retrieve the latest status from a scan history?
I would first define latest using the event timestamp and a tie rule, then ensure complete records follow that ordering. A reverse exact XLOOKUP can retrieve the last matching row from that prepared history. I would test a late-arriving older event so the report cannot confuse import order with event time.
How do next-smaller and next-larger matching differ?
They select neighbouring lookup keys in different directions when no exact key exists. Lower-bound bands commonly use next smaller; upper-capacity limits commonly use next larger. I choose from the policy meaning and test exact boundaries, nearby values and out-of-domain inputs.
What conditions do you check before choosing binary search?
The actual lookup field must be sorted in the required direction and remain aligned with its return records. I also check duplicate-key policy and whether imports preserve order. I would measure a real performance need rather than claiming binary mode improves every small workbook.
How would you explain a blocked multi-column result?
The formula needs several adjacent cells for its output. An occupied or merged cell can block that spill. I inspect the intended output area, preserve any existing content and move or clear the actual obstruction. I also keep the spilling formula outside Excel Tables.
How do you distinguish one record's fields from all matching records?
A wider XLOOKUP return array retrieves several attributes of its selected match. It does not enumerate every matching row. I use a unique key for a single-record report and a filtering or aggregation method when the business question involves a collection of records.
13. Build a short recall routine
Match mode
Decide which lookup values qualify: exact, a neighbouring boundary or an intentional text pattern.
Search mode
Decide how the supplied list is searched. Direction does not create a chronological ordering.
Event time
Keep timestamps and tie rules with the source. A last imported record may describe an older event.
Boundary meaning
Lower starts and upper capacities answer different questions. Test both sides of every threshold.
Spill shape
Several returned columns are several fields from one record. Keep their output area available and labelled.
Verification
Use known results, missing cases, reversed order and source changes. A plausible answer alone is not enough.
Final challenge: explain the late historical order without using the word latest until you have checked the dates. Then compare the fee and capacity examples and justify their opposite matching directions. Practise the original order and parcel questions in the Excel Task Hub, and continue to XMATCH for position-based matching.