Count number of values within cell

限于喜欢 提交于 2020-01-07 05:38:28

问题


I am trying to count the number of values within a cell, in Excel. So far I have found plenty of ways to count the number of characters, regardless of whether they're a space, number, or letter. However, I would like to count the number of values in a list or a cell, like so:

Let's say in cell A1 I have the following sequence of values:

38 39 101 102 114 115 116 117 118 119 120 121 122 123 124 125

I would like for the cell to return 16, indicating that there are sixteen values in the cell.

Is there an easy way to do this with Excel?


回答1:


If you have a known delimiter (what breaks up the values) and you don't have to test your data for whether it's a value or non-value then...

=LEN(A1)-LEN(SUBSTITUTE(A1,"[Your delimiter here]",""))+1

https://support.microsoft.com/en-us/kb/187667



来源:https://stackoverflow.com/questions/33311782/count-number-of-values-within-cell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!