Excel 具有多个条件的索引匹配

Excel 具有多个条件的索引匹配,excel,indexing,match,sumifs,Excel,Indexing,Match,Sumifs,我有一份按百分比排列的产品清单。我希望能够检索到小于特定百分位的第一个值 Product Orders Percentile Current Value Should Be Apples 192 100.00% 29 29 Apples 185 97.62% 29 29 Apples 125 95.24% 29 29 Apples 122 92.86

我有一份按百分比排列的产品清单。我希望能够检索到小于特定百分位的第一个值

Product Orders  Percentile  Current Value  Should Be 
Apples  192     100.00%     29             29
Apples  185     97.62%      29             29
Apples  125     95.24%      29             29
Apples  122     92.86%      29             29
Apples  120     90.48%      29             29
Apples  90      88.10%      29             29
Apples  30      85.71%      29             29
Apples  29      83.33%      29             29
Apples  27      80.95%      29             29
Apples  25      78.57%      29             29
Apples  25      78.57%      29             29
Apples  25      78.57%      29             29
Oranges 2       100.00%     0              1
Oranges 2       100.00%     0              1
Oranges 1       60.00%      0              1
Oranges 1       60.00%      0              1
Lemons  11      100.00%     0              2
Lemons  10      88.89%      0              2
Lemons  2       77.78%      0              2
Lemons  2       77.78%      0              2
Lemons  1       55.56%      0              2 
当前我在“当前值”列中的公式是:
=SUMIFS([Orders]、[Product]、[Percentile]、INDEX([Percentile]、MATCH(FALSE、[Percentile]>$O$1,0))
(作为数组公式输入)

$O$1包含我匹配的百分比(85.00%)

“Apples”(29)的当前值是正确的,但正如您所看到的,我的公式没有为剩余产品生成“Should Be”中的正确值,而是返回“0”。不知道如何设置它,让它做我需要的事情。我用SumProduct尝试了几件事情,但都没有成功。我需要一个更有经验的人来帮我

您不需要SUMIFS(),只需要索引/匹配:

=INDEX([Orders],MATCH(1,([Percentile]<$O$1)*([Product]=[@Product]),0))
=索引([Orders],匹配(1,([Percentile])您不需要SUMIFS(),只需要索引/匹配:

=INDEX([Orders],MATCH(1,([Percentile]<$O$1)*([Product]=[@Product]),0))

=INDEX([Orders],MATCH(1,([Percentile])谢谢!…顺便问一下,你是如何附加工作表的示例快照的?我想你必须有50个代表才能这样做。否则你会将其上载到imgur.com并链接到你的帖子中。为什么我只需切换如果我想找到大于某个百分位数的第一个数字?@LorenS应该是的,你还记得Ctrl-Shift-Enter键吗?是的,但它对我仍然不起作用。相反,它返回每个序列中的最大数字。谢谢!…顺便问一下,你如何附加工作表的示例快照?我想你必须有50个重复才能完成t、 否则你会将其上传到imgur.com并链接到你的帖子中。如果我想找到大于某个百分位数的第一个数字,为什么切换“”对我不起作用?@LorenS应该,你记得Ctrl-Shift-Enter吗?是的,但对我仍然不起作用。相反,它返回每个序列中的最大数字。