当单元格的alpha部分相同时,将单元格的数字部分相加 [英] Summing numeric portion of cell when alpha portion of cell is the same

查看:131
本文介绍了当单元格的alpha部分相同时,将单元格的数字部分相加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个电子表格,其中包含日期列,值可以是1v,.5v,1p,.5p,1s,.5s
每行中每行有一列一列 v,p和s。我想能够添加按字母分组的范围内的所有单元格的总和,然后显示相应列(v,p或c)中每个字母的总和。



以下是表格示例:

 姓名假期个人病1/5/15 1/6/15 1 / 7/15 1/8/15 
比利1.5 1 0 .5v 1v 1p

这是在度假/个人/病态细胞中的公式,我只是想不出来。

解决方案

假设您发布的范围从A1开始,请使用

  = SUMPRODUCT((RIGHT($ E2:$ G2,1)=v)* LEFT($ E2:$ G2,LEN($ E2:$ G2)-1))$ B2中的b $ b  

更改v,范围要适当使用。



Pro:





Con:




  • 我无法使其与空白单元格一起工作。


I have a spreadsheet that has columns for dates and the values can be either "1v, .5v, 1p, .5p, 1s, .5s" I have 3 columns in each row one for each letter "v, p and s". I want to be able to add the total of all cells in the range grouped by letter and then display the sum for each letter in it's respective column (v, p or c).

Here is an example of the sheet:

Name     Vacation   Personal   Sick   1/5/15  1/6/15  1/7/15  1/8/15
Billy       1.5        1         0       .5v    1v              1p

It is the formula that goes in the vacation/personal/sick cell that I just can't figure out.

解决方案

Assuming the range you posted starts at A1, use

=SUMPRODUCT((RIGHT($E2:$G2,1)="v")*LEFT($E2:$G2,LEN($E2:$G2)-1))

in B2. Change "v" and the range to use suitably.

Pro:

Con:

  • I could not make it work with blank cells.

这篇关于当单元格的alpha部分相同时,将单元格的数字部分相加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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