need vlookup function to return the row number

  • Thread starter Thread starter skiing
  • Start date Start date
S

skiing

I have a one column list of data (around 3,000 items) - and I am using
the vlookup function to determine if an item is in that list using
something like the formula below:

=if(iserror(vlookup(A1,D1:D3000,1,false)),"not in list","in list")

I would like to know if I can have this function return the cell
address or row number to indicate the location of the item in the list
- is this possible?

Thank you for your time and assistance
 
Use =match() instead.

=if(isnumber(match(a1,d1:d3000,0)),match(a1,d1:d3000,0),"No match")

=match() will either return an error (if there's no match) or it'll return an
index into the range. Since your range starts in D1, it'll be the same as the
row.
 
Back
Top