Google Exceltip.com
Account Icon
Shopping Cart
CheckOut

» Retrieving Each Row Number that Corresponds with Successful Matches in a Look Up

Problem:

We want to search List1 (column A) for the value stored in cell B2 and retrieve the row numbers that correspond with every successful match.

Solution:

Use the SMALL, IF, and ROW functions as shown in the following Array formula:
{=SMALL(IF($A$2:$A$8=$B$2,ROW($A$2:$A$8),99999),ROW()-ROW($B$2)+1)}
Copy the formula down column C until 99999 is returned, which indicates that no further matches were found.

To apply Array formula:
Select the cell, press and simultaneously press .
Rate this tip
12 34 5
  RATING: 3.29
  VIEWS: 13645
  No comments have been submitted.


REGISTERED USERS click here to post comments


GUESTSclick here to Register
Name
Comment Title
Comments


Terms and Conditions of use
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.

Copyright © 2003 ExcelTip.com
Microsoft, Microsoft Excel is a U.S. registered trademark of Microsoft Corporation