用于合并相似行但将1列中的值相加的公式 [英] Formula to combine similar rows but sum values from 1 column

查看:60
本文介绍了用于合并相似行但将1列中的值相加的公式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的数据格式如下(数量在仓库之间分配)

I have data in a format like the following (qty is distributed among warehouses):

我想得到这样的输出(对各个仓库的数量求和):

I would like to get output like this (sum the qty across warehouses):

可以使用Excel或Google表格公式完成此操作吗?我不是很熟悉如何设置VBA函数,因此如果可能的话,公式将是一个很好的选择.非常感谢!

Can this be done using an Excel or Google Sheets formula? I'm not real familiar with how to setup a VBA function, so a formula would be excellent if it's possible. Many thanks!

推荐答案

=query(A:C, "select A, sum(C) where A <> '' group by A label sum(C) 'qty'")

这篇关于用于合并相似行但将1列中的值相加的公式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆