excel - 根据降序值创建列表并包含重复项
问题描述
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
。
- 产品可以在列表中出现多次。
- 多个产品的销售数字可以相同。
Column D
现在,我想Column E
根据Column B
.
我尝试使用,=LARGE(B3:B12,1), =LARGE(B3:B12,2), ...
但它会从列表中删除所有重复项。
你知道我需要什么公式才能使这个列表起作用吗?
解决方案
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)
推荐阅读
- php - 如何使用 PHP 编辑图像中的特定像素
- mysql - 完整性约束违规:1048 列 'temporary_address' 在可为空的字段中不能为空错误
- android - 小部件 onUpdate 调用一次
- javascript - JavaScript - 声明全局变量
- windows - 终端中的不可见文本与纱线
- javascript - 从 javascript 中已有的数组中创建新数组
- jquery - Angular - 如何在 angular component.ts 中定义 owl carousel 回调函数?
- c++ - 模板元编程 - g++ 吃掉它,clang 不吃
- reactjs - 为什么我在安装 REACT 时收到此错误?
- php - 警告:session_destroy():试图在第 27 行销毁 D:\xampp\htdocs\PHP\MyBlog\lib\Session.php 中的未初始化会话