You want the earliest batch that passed inspection. Two rows qualify, so make sure the formula searches in the same order you reviewed them.
Match a logical TRUE from the top
Put actual TRUE/FALSE values or formulas in B4:B7. In this example the order is FALSE, FALSE, TRUE, TRUE. Enter the following in D2. The 0 requests an exact match and 1 searches first to last.
=XMATCH(TRUE,B4:B7,0,1)
Illustrated checklist. Match the first TRUE from the top.
Use the position in context
The formula returns 3, because the first match is third within B4:B7. If you need the worksheet row, add the starting row and subtract one.
=D2+ROW(B4)-1
Illustrated row conversion. A result of three is relative to the selected range.
Check that the row formula returns 6. Then try an all-FALSE copy. XMATCH returns #N/A when nothing passes, so preserve that meaning or display “No pass” with IFNA in a separate result cell.



