怎样统计一行数字中不同数字的个数?

例如:在一行数字1、2、5、9、8、2、6、5、8、7,中,相同的数字有3个,不同的个数是7,用什么样的函数自动统计出来?

第1个回答  2013-03-26
if you use matlab
you can type unique to find your answer追问

谢谢您的回答,但是我用的是excel表格,怎样在excel中统计呢?

追答

as picture 


1. copy the total data to another colume 

2. pusu following button and choose the new data


3. you will get unique data


4. type the following code in C    C1:  =SUMPRODUCT(--(A1:A10=B1))

and you can get the answer

相似回答