[英]Complicated counting in excel
I have the following columns in Excel 我在Excel中有以下列
a b c
1 SUM 1st 2nd
2 0 2/2 2/4
3 0 1/1 3/4
b2 is defined as "=CONCATENATE(TRUNC(2);"/";TEXT(('Other sheet'!B2);0))" and similar to b3,c2,c3. b2定义为“= CONCATENATE(TRUNC(2);”/“; TEXT(('Other sheet'!B2); 0))”和类似于b3,c2,c3。
Column |SUM| 列| SUM | should count sum from |1st|
应该从| 1st |计算总和 to |2nd|
到|第二| but only the first numbers before "/".
但只有“/”之前的第一个数字。
for example: b2+c3+... = 2+2+... = 4+... so a2=4+... 例如:b2 + c3 + ... = 2 + 2 + ... = 4 + ...所以a2 = 4 + ......
any ideas how to do that? 任何想法如何做到这一点? :)
:)
You can use the 'left' function 您可以使用“左”功能
Use it like this 像这样使用它
A2=left(B2;1)+left(C2;1)
使用以下公式,使用功能移位+ ctrl +输入:
=SUM(TRUNC(MID(B2:C2,1,SEARCH("/",B2:C2,1)-1)))
Here's a simple way to do it 这是一个简单的方法
=SUMPRODUCT(INT(SUBSTITUTE(B2:C2,"/",".")))
Extend your range as far as you need by changing B2:C2
to B2:X2
, for example. 例如,通过将
B2:C2
更改为B2:X2
,可以根据需要扩展您的范围。
=SUMA.ILOCZYNÓW(ZAOKR.DO.CAŁK(PODSTAW(B2:C2;"/";".")))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.