首页 > 解决方案 > 根据降序值创建列表并包含重复项

问题描述

Excel文件

   |      A       |        B          |    C   |       D         |      E     |
---|--------------|-------------------|--------|-----------------|------------|----
1  |    Product   |       Sales       |        |     Product     |    Sales   | 
---|--------------|-------------------|--------|-----------------|------------|----
2  |   Product_A  |        20         |        |     Product_D   |     100    |
3  |   Product_A  |        10         |        |     Product_D   |      90    |
4  |   Product_A  |        50         |        |     Product_B   |      80    |
5  |   Product_B  |        80         |        |     Product_A   |      50    |
6  |   Product_C  |        40         |        |     Product_D   |      50    |
7  |   Product_C  |        30         |        |     Product_D   |      50    |
8  |   Product_D  |       100         |        |     Product_C   |      40    |
9  |   Product_D  |        90         |        |     Product_C   |      30    |
10 |   Product_D  |        50         |        |     Product_A   |      20    |
11 |   Product_D  |        50         |        |     Product_D   |      10    |
12 |              |                   |        |                 |            |

Column A我有不同产品的列表及其相应的销售额Column B

  1. 产品可以在列表中出现多次
  2. 多个产品的销售数字可以相同。

Column D现在,我想Column E根据Column B.
我尝试使用,=LARGE(B3:B12,1), =LARGE(B3:B12,2), ...但它会从列表中删除所有重复项。

你知道我需要什么公式才能使这个列表起作用吗?

标签: excel

解决方案


Office 356 解决方案:

=SORT(A2:B11,2,-1,FALSE)

包括过滤器:

=SORT(FILTER(A2:B11,A2:A11=M2,""),2,-1,FALSE)

包括多个过滤器-标准:

=SORT(FILTER(A2:B11,(A2:A11=M2)*(A2:A11=M2)*(A2:A11=M2),""),2,-1,FALSE)

推荐阅读