简体   繁体   English

Excel:如何仅添加一个单元格中的值,跳过其他文本和字符?

[英]Excel: How to add only the values from one cell, skipping other text and characters?

在此处输入图片说明 I have values such as below in one single cell E2 in excel. 我在excel中的一个单元格E2中具有以下值。 How do I skip the paranthesis, space and the text that is there in the cell and add only the values enclosed within the brackets and show the result in D2? 如何跳过单元格中的括号,空格和文本,仅添加方括号内的值,并在D2中显示结果? (5) text (5) text (5) text (10) text (10) text (15) text (10) text (10) text (20) text (10) text (5)文本(5)文本(5)文本(10)文本(10)文本(15)文本(10)文本(10)文本(20)文本(10)文本

I've attached an image to show an idea of how it looks. 我已附上一张图片,以显示其外观。

=SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE(TRIM(SUBSTITUTE(A1,"text"," ")),"(",""),")",""))," ","")

另一个,

=SUMPRODUCT(--REPLACE(A1:A10, FIND(" ", A1:A10), LEN(A1:A10), TEXT(,)))

If given input string is well formatted, I can extract the number with excel function. 如果给定的输入字符串格式正确,则可以使用excel函数提取数字。

=value(MID(F1,FIND("(",F1)+1,FIND(")",F1)-FIND("(",F1)-1))

This function is composed of 3 elemental functions. 该功能由3个基本功能组成。

=value(MID(  F1  ,  FIND("(",F1)+1  ,  FIND(")",F1)-FIND("(",F1)-1  ))
F1: we want to extract the number from this
FIND("(",F1)+1 : where the number start from
FIND(")",F1)-FIND("(",F1)-1 : calculates the length of the number
MID:extract a string
value :deal(cast) a string as a number

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从Excel单元格中删除文本/字符 - How to remove text/characters from an Excel cell 仅将文本从一个字符单元移动到另一个字符单元 - Moving ONLY text over from one cell of characters to another 如何使用Excel从一个工作表中的一个单元格填充另一个工作表中的一个单元格 - How to populate a cell in one sheet from a cell in the other using excel 在Excel中的一个单元格中添加单元格区域的文本 - Add text of cell range in one cell in Excel Ms Excel: 如何解析/解析从一个单元格到其他3个单元格的数据值? - Ms Excel: How to parse / parsing data values from one cell to other 3 cells? 如何使 Excel 单元格中的最后 3 个字符可见 - How to make visible only last 3 characters from Excel cell Excel中根据另一个单元格更改一个单元格的值 - Changing Values of one cell based on the Other in Excel MS Excel,如何将文本从一列移动到一个单元格中? - MS Excel, how to move text from one column into one cell? 如何从单元格中的文本解析值并将值放置到其他单元格中 - How to parse values from text in a cell and place values into other cells Excel:get_Range(cellName).Text 仅给出单元格中的 8000 个字符。 这里 Cell 总共有 20000 个字符 - Excel : get_Range(cellName).Text gives only 8000 characters from cell. Here Cell has total 20000 characters
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM