FormulaCraft

Lookups (any direction)

Every lookup variant beyond VLOOKUP / XLOOKUP / INDEX-MATCH — HLOOKUP, LOOKUP, two-way, case-sensitive, nth-match. The full lookup toolkit.

13 pages · 1 reference, 12 how-to

Reference

How-to guides

How to look up the last matching value

Use LOOKUP with a search trick or XLOOKUP with search mode -1 to find the last occurrence of a value in a list.

How to do a lookup with wildcards

Use VLOOKUP or MATCH with wildcard characters (* and ?) to perform partial-match lookups on text values.

How to do a case-sensitive lookup

Use INDEX with MATCH and the EXACT function to perform a lookup that distinguishes between uppercase and lowercase text.

How to look up a value and sum the matches

Use SUMIF or SUMIFS to sum all values that match a lookup criterion, returning the total of all matching rows rather than a single result.

How to find the closest matching value

Use INDEX and MATCH with ABS and MIN to find the value in a list that is numerically closest to a target number.

How to look up a value across multiple columns

Use MATCH with a combined range or INDEX to search for a value across several columns and return the column it was found in or its adjacent value.

How to look up and return multiple values

Use FILTER (Sheets/Excel 365) or an INDEX/SMALL/IF array formula to return all matches for a lookup value.

Excel ≠ Sheets

How to look up and return an entire row

Use INDEX with MATCH to return multiple columns from a matched row, or use XLOOKUP in Excel 365 and Sheets to spill an entire row of results.

How to look up the most recent date for an item

Use MAXIFS (Excel) or MAX with IF as an array formula to find the latest date associated with a specific item in a list.

How to look up and concatenate all matches

Use TEXTJOIN with IF as an array formula in Excel, or TEXTJOIN with FILTER in Google Sheets, to find all matching values and join them into one cell.

Excel ≠ Sheets

How to find the first matching value in a row

Use MATCH with a horizontal range to locate the column position of the first value meeting your criteria, then pair with INDEX to retrieve it.

How to look up the nth matching value

Use SMALL with IF as an array formula to retrieve the position of the nth match, then INDEX to return the corresponding value from any column.