在 Excel 中组合附加到同一变量的多个值
Combining multiple values attached to the same variable in Excel
我需要将与同一变量相关的多个值添加到一个条目中。这是我的工作表的样子:
ColA ColB ColC
Onion Ounces 12
Onion Ounces 6
Carrot Kilo 3
Basil Grams 25
Carrot Kilo 6
Basil Cups 3
这是我想弄清楚如何做的事情:
ColA ColB ColC
Onion Ounces 12
Onion Ounces 6
Carrot Kilo 3
Basil Grams 25
Carrot Kilo 6
Basil Cups 3
__________________
Onion Ounces 18
Carrot Kilo 9
Basil Grams 25
Basil Cups 3
*如果colA匹配(两个条目都是'Basil'),但是colB不匹配(一个条目是'ounces',一个条目是'cups')它需要有单独的条目.
我是 excel 的新手,甚至不确定如何正确地表达这个问题,如果之前已经回答过很多次,我深表歉意!
非常感谢您的帮助!
使用Query:
=QUERY(A1:C6,"Select A,B,Sum(C) group by A,B")
我需要将与同一变量相关的多个值添加到一个条目中。这是我的工作表的样子:
ColA ColB ColC
Onion Ounces 12
Onion Ounces 6
Carrot Kilo 3
Basil Grams 25
Carrot Kilo 6
Basil Cups 3
这是我想弄清楚如何做的事情:
ColA ColB ColC
Onion Ounces 12
Onion Ounces 6
Carrot Kilo 3
Basil Grams 25
Carrot Kilo 6
Basil Cups 3
__________________
Onion Ounces 18
Carrot Kilo 9
Basil Grams 25
Basil Cups 3
*如果colA匹配(两个条目都是'Basil'),但是colB不匹配(一个条目是'ounces',一个条目是'cups')它需要有单独的条目.
我是 excel 的新手,甚至不确定如何正确地表达这个问题,如果之前已经回答过很多次,我深表歉意!
非常感谢您的帮助!
使用Query:
=QUERY(A1:C6,"Select A,B,Sum(C) group by A,B")