简体   繁体   中英

Index/Match/Large Multiple Criteria

Trying to derive the top 3 highest cost fruits and return the date they were bought excluding apples and oranges. I would like to avoid using a helper column. Having issues w/ these formulas. Not sure if you can have an array (Large w/ IFS) inside of another formula. The formulas I have so far:

=INDEX(A:A,MATCH(LARGE(IFS(B:B,"<>Apple",B:B,"<>Orange"),1),C:C,0))

=INDEX(A:A,MATCH(LARGE(IFS(B:B,"<>Apple",B:B,"<>Orange"),2),C:C,0))

=INDEX(A:A,MATCH(LARGE(IFS(B:B,"<>Apple",B:B,"<>Orange"),3),C:C,0))

在此处输入图像描述

With older versions we need to use Nested Aggregates:

=INDEX(A:A,AGGREGATE(15,7,ROW(A2:A12)/((C2:C12=AGGREGATE(14,7,C2:C12/((B2:B12<>"A")*(B2:B12<>"O")),ROW($ZZ1)))*(B2:B12<>"A")*(B2:B12<>"O")),1))

Put that in the first output cell and copy/drag it down.

在此处输入图像描述

with Office 365 we can use TAKE/SORT/FILTER:

=TAKE(SORT(FILTER(A:C,(B:B<>"A")*(B:B<>"O")),3,-1),3,1)

在此处输入图像描述

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