excel - Getting the sum of second column where column A contains specific characters but exclude a certain letter
问题描述
I have this setup in my worksheet
First Second ABXX 1 ABXX 2 ABCXX 10 ABXX 3 ABCXX 20
where AB and ABC are static and the XX are numbers
and i need to do the following in a single cell (cell 1)
If column 1 contains AB, get the sum of its 2nd column
and do this on another cell (cell 2)
if column 1 contains ABC, get the sum of its 2nd column
im using this formula =SUMIF(A:A,"*AB*",B:B)
but the problem is it also includes ABC because it also contains the letters "AB"
is there a way to go around this?
解决方案
如果末尾总是有两位数字,那么也许只是?
用来匹配单个字符:
=SUMIF(A:A,"AB??",B:B)
和
=SUMIF(A:A,"ABC??",B:B)
推荐阅读
- javascript - 如何根据其 html 内容隐藏列表项?
- node.js - 如何加载要由我的 tfjs 模型处理的一批图像
- python - DjangoMySQLConverter 对象没有属性 _tuple_to_mysql
- python - 更新python字典中的值
- javascript - 失败的道具类型:道具`auth`在`Navbar`中标记为必填,但其值为`undefined`
- view - 优化 DB2 查询的方法
- jinja2 - Apache Airflow:如何使用 Jinja 模板在 DockerOperator 中对卷进行模板化
- javascript - 返回不同类型用法的方法
- javascript - 如何在角度动态形式上进行自动对焦
- c# - Xamarin.Forms 和触发器:在有限的时间内雇用一个动作