where “data” is the named range B5"B12. Note: this is an array formula and must be entered with control + shift + enter, except in Excel 365. Once the test is run, it returns an array or TRUE and FALSE values: With the lookup_value set to FALSE, and match_type set to zero to force and exact match, the MATCH function returns 4, the position of the first FALSE in the array.
Get associated value
To retrieve the associated value from the Quantity column, where “quantity” is the named range C5:C12, you can use INDEX and MATCH together:
Literal contains
If you need to match the first value that literally “does not contain”, you can use a variant of the formula. For example to match the first value in data that does not contain an “r”, you can use: Note: this is an array formula and must be entered with control + shift + enter, except in Excel 365. For more details about ISNUMBER + SEARCH, see this page.
Dave Bruns
Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.