excel - Use of MAXIFS (in excel 2010)

纵饮孤独 提交于 2020-01-16 08:36:11

问题


I want to solve a stock problem. I have stock from some articles in a specific store and I want to find out which store in the same country has the highest stock of this specific item.

I use the table below for information input

Colom A: Article number

Colom B: Country

Colom C: Stock

Colom D: Store number

For instance:

I would like to know for article 884 in Netherlands, which store has the highest stock. The outcome would be store 1.

I'm not able to use the formulas MAXIFS :(. Is there a possibility to work around and get the same answer?


回答1:


Whilst you could do as per my comment using MAX and IF in an array (also see this page for some additional information), you can also try the following:

Formula in G3:

=INDEX(D2:D7,MATCH(1,INDEX((A2:A7=G1)*(B2:B7=G2)*(C2:C7=MAX(INDEX((A2:A7=G1)*(B2:B7=G2)*(C2:C7),))),),0))

Or in Dutch (I assume you are)

=INDEX(D2:D7;VERGELIJKEN(1;INDEX((A2:A7=G1)*(B2:B7=G2)*(C2:C7=MAX(INDEX((A2:A7=G1)*(B2:B7=G2)*(C2:C7);))););0))



回答2:


I have a feeling there's a much simpler solution to that, but... here it goes...

=INDEX($D$2:$D$7,SUMPRODUCT(MATCH(MAX(--($A$2:$A$7=A10)*--($B$2:$B$7=B10)*$C$2:$C$7),--($A$2:$A$7=A10)*--($B$2:$B$7=B10)*$C$2:$C$7,0)))



来源:https://stackoverflow.com/questions/59054343/excel-use-of-maxifs-in-excel-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!