简体   繁体   中英

INDEX & MATCH with multiple Criteria

I have been trying to figure it out for what I was doing wrong

Here the explanation for what I am currently doing :

  1. It is a game that customer need to guess for 4 condition ( outfit,brand,color,price )
  2. I have to match between 2 worksheets which is customer's guessing and list (which is criteria)
  3. it going to show only 2 result ( bingo,try again like in yellow column)
  4. the criteria is guessing for outfit,brand,color need to be exactly correct (as shown in list-worksheet)
  5. for price it can be the other values but not less/more than 5
=IF(ABS(INDEX(list!D:D,MATCH(A2,list!A:A,0),MATCH(B2,list!B:B,0),MATCH(C2,list!C:C,0))-D2)<=5,"bingo",IF(ABS(INDEX(list!F:F,MATCH(A2,list!A:A,0),MATCH(B2,list!B:B,0),MATCH(C2,list!E:E,0))-D2)<=5,"bingo","try again"))
  • the above is formula that I use but it turned out error
  • if doing correctly the result would be like in yellow column
  • Note column and orange highlights does not involve it's just optional explanation for your understanding

客户的猜测

列表

list

So the main reason you're running into issues is because your list worksheet is setup terribly. Excel runs best with a flat-file type data structure. It should be reformatted to this:

在此处输入图像描述

Then you can setup your guessing game and use a simple SUMIFS formula:

在此处输入图像描述

In cell E2 of the guessing game worksheet, the formula is:

=IF(ABS(D2-SUMIFS(list!D:D,list!A:A,A2,list!B:B,B2,list!C:C,C2))<5,"Bingo!","Try again")

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