[英]Excel Sum extracted numbers from text string
Somebody could help me with this problem?有人可以帮我解决这个问题吗? I need to extract the numbers from a text string and then Sum them with a single formula.我需要从文本字符串中提取数字,然后用一个公式对它们求和。
The 3 first caracters of the string are always the same:字符串的前 3 个字符始终相同:
A::23答::23
A::4 A::4
A::8答::8
A::10答::10
A::44答::44
To remove the alphanumeric caracters I use =MID(A1,3,2), however this formula works well for every single cell only.要删除字母数字字符,我使用 =MID(A1,3,2),但是此公式仅适用于每个单元格。
I am trying to create a formula that will Sum all the extracted numbers of a given range.我正在尝试创建一个公式,该公式将对给定范围的所有提取数字求和。
Any suggestion?有什么建议吗?
=SUMPRODUCT(0+RIGHT(SUBSTITUTE(A1:A5,":",REPT(" ",17)),17))
This is one way to do it:这是一种方法:
{=SUM(VALUE(MID($A$1:$A$5,4,2)))}
to enter the function press Ctrl + Shift + Enter (rather than just Enter )进入功能按Ctrl + Shift + Enter (而不仅仅是Enter )
Edit:编辑:
{=SUM(MID($A$1:$A$5,4,2)*1)}
also works也有效
=SUMPRODUCT(VALUE(MID(ROW(INDIRECT("1:"&LEN(A1))),1)))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.