按类别提供的总数据 - Excel / Google Drive Spreadsheet [英] Total data by category - Excel / Google Drive Spreadsheet

查看:155
本文介绍了按类别提供的总数据 - Excel / Google Drive Spreadsheet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已在Google云端硬盘电子表格中添加了一组数据,包括项目,价格和类别此处 - https://docs.google.com/spreadsheets/d/1JkWoQmo0qHfi8Ld5CEOGOFQtn4dXYzc4kSMEOmAxibM /编辑#gid = 0 (我现在已经锁定这个电子表格进行编辑,因为Gvee的答案是有效的)



我试图做的是总价格每个类别中,目前我所做的工作是过滤类别列,然后通过突出显示价格列查看总数,然后手动输入它。



是否有自动计算每个类别的总计的方法?



我喜欢使用函数(而不是宏),因此它可以在Google Drive Spreadsheets和Excel中运行。

解决方案

在示例工作表中,将以下公式放在单元格 G5中

  = SUMIFS(B:B,C:C,F5)

这是对列B(价格)中的值进行求和,其中列C(类别)中的值与F5中的值匹配(alpha)。

通过将F5更改为引用F6,F7,F8等,可以将此相同的公式应用于其他类别。


Ive got a set of data in a Excel / Google Drive spreadsheet, there are 3 columns : item, price, category.

Ive included an example Google Drive Spreadsheet here - https://docs.google.com/spreadsheets/d/1JkWoQmo0qHfi8Ld5CEOGOFQtn4dXYzc4kSMEOmAxibM/edit#gid=0 (I have now locked this spreadsheet for editing as Gvee's answer works)

What im trying to do is to total the prices for each category, at the moment what im doing is filtering the category column and then finding the total by highlighting the price column see the total in the bottom right, and manually entering it.

Is there an automated way to calculate the totals for each category ?

Id like to do this using functions (rather than macros) so it can run in both Google Drive Spreadsheets as well as Excel.

解决方案

In your example sheet put the following formula in cell G5

=SUMIFS(B:B, C:C, F5)

What this does is sum up values in columnn B (price) where the value in column C (category) matches the value in F5 ("alpha").

This same formula can be applied to the other categories by changing F5 to reference F6, F7, F8, etc

这篇关于按类别提供的总数据 - Excel / Google Drive Spreadsheet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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