使用公共列合并多行上的列

问题描述 投票:0回答:1

尝试使用一行作为“主键”在多行中“展平”Google表格。

VBA在Excel中回答:Merging Rows with common column

尝试使用Find进行过滤,但是我遇到了不匹配的行错误。不确定如何跨多行使用VLOOKUP,并且单元格值的标准不为空。

之前

| animal | legs | cute |
|--------|------|------|
| dog    |      |      |
| dog    | 4    |      |
| dog    |      | yes  |
| cat    | 4    |      |

| animal | legs | cute |
|--------|------|------|
| dog    | 4    | yes  |
| cat    | 4    |      |
google-sheets array-formulas google-sheets-formula google-sheets-query gs-vlookup
1个回答
1
投票

试试这样:

={A1:C1; ARRAYFORMULA({QUERY(TO_TEXT(A2:B), "where Col2 !=''", 0), 
 IFERROR(VLOOKUP(QUERY(TO_TEXT(A2:B), "select Col1 where Col2 !=''", 0), 
 SORT(A2:C, 3, 1), 3, 0))})}

0

© www.soinside.com 2019 - 2024. All rights reserved.