L
Legacy 5596
Guest
Hello I'm using index & match to locate a match in one column & return the contents of another:
=IF(ISERROR(INDEX(database!$B$2:$B$2000, MATCH(A1, database!$A$2:$A$2000, FALSE),1)),"Not Found", INDEX(database!$B$2:$B$2000, MATCH(A1, database!$A$2:$A$2000, FALSE),1))
This works fine & just to break it down it is interacting with 2 sheets.
A1 is the on the source sheet & is the criteria to be matched on database!$A$2:$A$2000 -- If its matched, then return the contents of database!$B$2:$B$2000 of the corresponding row of the first matched row of database!$A$2:$A$2000
Here's the problem, Suppose database!$A$2:$A$2000 is a list of names & database!$B$2:$B$2000 is a list of phone numbers, BUT suppose on first match doesn't have a phone number listed. I want to go to the NEXT match that DOES have a phone number & return that.
Help is appreciated. Thanks
=IF(ISERROR(INDEX(database!$B$2:$B$2000, MATCH(A1, database!$A$2:$A$2000, FALSE),1)),"Not Found", INDEX(database!$B$2:$B$2000, MATCH(A1, database!$A$2:$A$2000, FALSE),1))
This works fine & just to break it down it is interacting with 2 sheets.
A1 is the on the source sheet & is the criteria to be matched on database!$A$2:$A$2000 -- If its matched, then return the contents of database!$B$2:$B$2000 of the corresponding row of the first matched row of database!$A$2:$A$2000
Here's the problem, Suppose database!$A$2:$A$2000 is a list of names & database!$B$2:$B$2000 is a list of phone numbers, BUT suppose on first match doesn't have a phone number listed. I want to go to the NEXT match that DOES have a phone number & return that.
Help is appreciated. Thanks