Function Problems

Find the Cell Address of a Matching Value in Excel

John WilsonJohn Wilson Dec 2, 2026 868 views

Question details

Find the address of the first or last cell matching a lookup value in an Excel range.

Find the Cell Address of a Matching Value in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user wants to locate a value in a worksheet range and return its cell reference.
Observed behavior
The formula should return an address such as A3, or indicate that no match was found.
Before you start

Identify the range to search and enter the lookup value in K2. Choose whether the first or last match should be returned; for a multi-column range, the formula below searches each row from left to right.

Solution 1Recommended

Find a match in a multi-column range with Excel 365 or Excel 2024

Use TOCOL and XMATCH to return the first or last matching address in a rectangular range.

The formula searches A1:H15 row by row, from left to right. It returns a relative address such as B3 rather than the cell value.

1
Enter the first-match formula

Select an empty cell outside A1:H15 and enter =IFERROR(LET(p,XMATCH($K$2,TOCOL($A$1:$H$15,0),0,1),ADDRESS(ROW($A$1)+QUOTIENT(p-1,COLUMNS($A$1:$H$15)),COLUMN($A$1)+MOD(p-1,COLUMNS($A$1:$H$15)),4)),"Not found").

2
Return the last match

To search from the end instead, change the final argument of XMATCH from 1 to -1 and press Enter.

3
Adjust the range

Replace every occurrence of $A$1:$H$15 with your data range, replace $A$1 with its top-left cell, and replace $K$2 with your lookup cell.

Find a match in a multi-column range with Excel 365 or Excel 2024
Why the position matters: Taking the minimum matching row and minimum matching column separately can produce an address that does not contain the lookup value. This formula uses one matching position for both coordinates.
WPS Spreadsheets

Find a matching cell address in WPS Spreadsheets

Use ADDRESS with MATCH to return the first matching cell in a column, or use LOOKUP to find the last match.

  1. 1. Open your workbook: Open WPS Spreadsheets and choose File > Open to select your workbook.
  2. 2. Prepare the lookup: Place the values to search in A1:A15 and enter the lookup value in K2, or adapt those references to your sheet.
  3. 3. Find the first match: Select an empty cell and enter =IFERROR(ADDRESS(ROW($A$1)+MATCH($K$2,$A$1:$A$15,0)-1,COLUMN($A$1),4),"Not found"). Press Enter.
  4. 4. Find the last match: For the last match instead, enter =IFERROR(ADDRESS(LOOKUP(2,1/($A$1:$A$15=$K$2),ROW($A$1:$A$15)),COLUMN($A$1),4),"Not found") in an empty cell and press Enter.
Return a matching cell address instead of the valueOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formulas and worksheet controlsWork with a free, easy-to-use office suite
microsoft office alternative - wps office

Frequently Asked Questions

How do I return the last match instead of the first?

In the multi-column Excel formula, change XMATCH's search mode from 1 to -1. In the single-column array formula, replace SMALL with LARGE.

What does the 4 in the ADDRESS formula do?

The fourth argument tells ADDRESS to return a relative reference such as A3. Change it to 1 to return an absolute reference such as $A$3.

Why does the formula display "Not found"?

IFERROR displays that message when the formula produces an error, including when there is no match. Check the value in K2, the search range, and any errors in the source cells.

Can I use a named range instead of cell references?

Yes. Replace the range references with your named range and make sure the top-left cell reference used by ADDRESS corresponds to that range.

Does MATCH treat asterisks and question marks as literal characters?

With MATCH set to exact-match mode 0, * and ? in a text lookup value are wildcards. Use ~* or ~? in the lookup value to search for those characters literally.