google-sheets - 通过 Google 表单数据搜索
问题描述
我有一个输出如下数据的 Google 表单:
买家表格的行示例(对于填写表格的每个买家):
Timestamp | User 1 | Product 1 | Price 1 | Product 2 | Price 2 | Product 3 | Price 3 ...
Timestamp | User 2 | Product 1 | Price 1 | Product 2 | Price 2 | Product 3 | Price 3 ...
在另一张名为Bids的工作表上:
Product 1 | Base Price
Product 2 | Base Price
Product 3 | Base Price
我想要达到的结果是获得不同产品的所有出价,并在每个产品旁边显示具有相应用户名的最高出价。我已经尝试过lookupv
但query
没有成功,我不完全是谷歌表格的专家(这是一种委婉说法)。
有任何想法吗?
这是实际工作表的副本: https ://docs.google.com/spreadsheets/d/1bW_MlogHpXQk-_DZupE22No7KwUyZesqggsEdQaXPgw/edit?usp=sharing
以我想要获得的计算机投标表上的示例为例。买家是从 Google 表单自动填充的表格。
解决方案
利用:
=ARRAYFORMULA(IFNA(VLOOKUP(A2:A, SORT(SPLIT(QUERY(FLATTEN(IF(
FILTER(Buyers!C2:1000, MOD(COLUMN(Buyers!C1:1)-1, 2)=0)<>"",
FILTER(Buyers!C2:1000, MOD(COLUMN(Buyers!C1:1)-1, 2)=0)&"×"&
FILTER(Buyers!C2:1000, MOD(COLUMN(Buyers!C1:1), 2)=0)&"×"&Buyers!B2:B1000, )),
"where Col1 is not null"), "×"), 2, 0), {2, 3}, 0)))
推荐阅读
- blazor-webassembly - Blazor Webassembly 应用程序中的轮询线程
- linux - Shell 脚本在查找余数时没有输出
- boto3 - 遍历 AWS 安全组
- node.js - 将 Nx 工作区部署到 Google App Engine
- java - 如何在 If 语句之间共享变量?
- postgresql - 如何将两列合二为一
- scheme - 你如何过滤 Racket 中的算术程序?
- android - Android 应用程序如何访问 Intune MDM 放置的受信任证书?
- swift - Unexpected Cannot assign to property 'self' is immutable compile time error IN CLASS
- python - 如何在不使用 list 或 dict 等可变类型的情况下传递函数引用