请问在EXCEL里面怎样统计字数?谢谢
登录 | 论坛导航 -> 华新鲜事 -> 技术の宅 | 本帖共有 3 楼,当前显示第 2 楼 : 从楼主开始阅读 : 本帖树形列表 : 返回上一页
作者:Wuvist (等级:2 - 初出茅庐,发帖:54) 发表:2005-05-13 20:33:46  2楼 
貌似没有方便的方法。。倒是可以用sum, len等等函数自己写个公式来统计
懒得写。。从office help里面转一段:

Count the number of words in a cell

You can count the number of words in a cell by using the following formula:

=IF(LEN(TRIM(A1))=0,0,LEN(TRIM(A1))-LEN(SUBSTITUTE(A1," ",""))+1)

Note To avoid a circular reference, make sure you enter the formula in a cell outside the cell for which you are counting the words.

In this example, imagine that cell A1 contains the text "Have a nice day!", and cell A2 contains the formula. The formula returns a value of 4 to reflect that the cell contains four words separated by spaces. It makes no difference if words are separated by multiple spaces or if words start or end with a space. The TRIM function removes extra spaces, starting spaces, and ending spaces in the text of the cell.
Count the number of words in a range of cells

You can count the number of words in a worksheet by using a similar formula, but you must enter it as an array formula (array formula: A formula that performs multiple calculations on one or more sets of values, and then returns either a single result or multiple results. Array formulas are enclosed between braces { } and are entered by pressing CTRL+SHIFT+ENTER.):

{=SUM(IF(LEN(TRIM(A1:D7))=0,0,LEN(TRIM(A1:D7))-LEN(SUBSTITUTE(A1:D7," ",""))+1))}

Notes

* To avoid a circular reference, make sure you enter the formula in a cell outside the range for which you are counting the words.
* To enter an array formula, select the cell that contains the formula, press F2, and then press CTRL+SHIFT+ENTER.

In this example, imagine that cells A1 to D7 contain the words you want to count. To get the total number of words in the specified range, the array formula counts the words in each cell of that range, and the SUM function then adds up the values for each cell to get the total.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表

本帖共有 3 楼,当前显示第 2 楼,本文还有 N-1 层楼,要不你试试看:点击此处阅读更多 >>



请登录后回复:帐号   密码