Excel:基于相邻列中值的存在对单元格求和 [英] Excel: summing cells based on the presence of value in adjacent column

查看:89
本文介绍了Excel:基于相邻列中值的存在对单元格求和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在试图解决Excel困境时碰巧遇到了这个论坛:

I happened upon this forum while looking to solve an Excel dilemma:

我有一个会计电子表格,其中将不同的行项目费用按字母分类在各种类别中(例如,B列中的"R"表示A列中列出的金额是租金").

I have an accounting spreadsheet where different line item charges are classified in various categories by a letter (e.g. "R" in column B means the amount listed in column A is for "Rent").

我想要做的是基于B列中的类似值来总计A列中的值(总计所有租金).

What I want to do is total the values in column A based on like values in column B (total up all of the rent payments).

有人可以建议一个可行的功能吗?

Can someone suggest a function(s) that would work?

提前谢谢!

推荐答案

您可以将Sumif()函数用于单个条件,也可以将SUMIFS()用于多个条件.请参见下面的屏幕截图.

You can use Sumif() function for single criteria or you can use SUMIFS() for multiple criteria. Please see below screenshot.

=SUMIF(B2:B7,"R",A2:A7)

=SUMIFS(A2:A7,B2:B7,"R")

这篇关于Excel:基于相邻列中值的存在对单元格求和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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