简体   繁体   中英

Using MATCH function as range in VLOOKUP function in Excel

Main Problem statement : To retrieve multiple matches in excel.

I have 3 columns starting from AD to AF.AD has multiple matches.I need to retrieve AF values for matched AD value.

I searched on net and got the below formula.

=IFERROR(INDEX($B$3:$B$13,SMALL(IF(D$2=$A$3:$A$13,ROW($A$3:$A$13)- MIN(ROW($A$3:$A$13))+1,""), ROW()-2)),"")

But I am trying to implement my own solution.I am trying to use MATCH function as range in VLOOKUP function.Then change the range of MATCH function to retrieve 2nd match and so on.Continue this until there is no match found.

Here is what I tried which is giving an #NAME error .

=VLOOKUP(AD3,AD&EVAL("=MATCH(AD3,AD:AD,0)"):AF1000,3,0)

Also,it would be very appreciated if there is another solution to the main problem statement.

If this is the right direction to proceed,please help to complete this formula.

Thanks.

  1. Main Problem statement : To retrieve multiple matches in excel.
  2. Now I have to get multiple matches and compare them if they are equal.

You seem to have an XY Problem . You are concentrating on resolving the first half of your formula problem while ignoring a simpler solution that would resolve the entire task.

=and(countif(ad:ad, ad3)=countifs(ad:ad, ad3, af:af, af3))

True if all related values in column AF where column AD is equal to AD3 are the same; false if column AF contains differing values.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM