添加用字符括起来的数字 [英] Adding numbers enclosed in characters

查看:103
本文介绍了添加用字符括起来的数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



例如,我想添加



我正在尝试添加包含字符的excel中的数字。 pre> rs30 / -
rs40 / -
rs45 / -

我想要结果为 rs115 / -



我尝试过

  = SUM(IF(ISNUMBER( -  A1:A3), -  A1:A3))

,但是会产生零。

解决方案

使用 MID 从字符串中提取数字文本,然后使用 VALUE 将该文本转换为实际数值,然后使用 SUM 添加,然后使用& 连接到您之前和之后的字符。 / p>

示例:

  =rs& SUM(VALUE(MID(A1:A3,3,LEN(A1:A3)-4)))&使用 Ctrl  作为数组公式输入/  - 

Shift 输入




I am trying to add numbers in excel which contain characters.

For example, I want to add

rs30/-
rs40/-
rs45/- 

I want result as rs115/-

I tried

=SUM(IF(ISNUMBER(--A1:A3),--A1:A3)) 

but that gives zero.

解决方案

You can use MID to extract the number text from the character string, then VALUE to convert that text to an actual numerical value, then add those using SUM, then use & to concatenate with the characters you want before and after the result.

Example:

="rs" & SUM(VALUE(MID(A1:A3,3,LEN(A1:A3)-4))) & "/-"

entered as an array formula using Ctrl Shift Enter.

这篇关于添加用字符括起来的数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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