用Excel 做統計的問題? 請各位幫幫手Thx!

2007-12-07 9:03 am
我想計算2這個數出現的次數........出現過2次........出現過3次........出現過4次
2,3,6,5,3,3,1,6,1 ................................2...................5.....................6
3,2,1,7,3,5,4,1,2.................................4
2,1,6,3,5,4,6,1,6......................................自動會顯示↑
例如 2;2 次............. 我應用如何公式 ↑ ,才會在這裡自動顯示數值?
........3;6 次
........4;2 次
........6;4 次
........5;3 次
若我想做這樣的圖表,我應用怎樣的公式或方法?
請求各位幫忙解這問題。
謝謝!

回答 (2)

2007-12-07 10:19 am
✔ 最佳答案
Method (1) you can use countif as suggested:

Assume all your data in column A, then column B will have data like :

Cell B1 = 2
Cell B2 = 3
Cell B3 = 4
...
..
so in cell C1 you can type in this formula:

=countif(A:A, B1)

then it will show that how many times do that [2] appear in column A. You can copy that formula and copy to other cells in column B.

Method (2) Pivot Table.

Pivot table is a pretty convenient tool for you to handle the data.

First highlight the range of the data, in this case is column A.

Then type:
ALT + D +P

and you can see a wizard to setup a pivot table.

Click Next to select range (which is column A)
Click Next to select where you want to output the report, or you could choose to output to a new worksheet.
Click FINISH.

You should see 4 square box on the new worksheet and a Pivot Table field list on the right.

You can then drag that data in the Pivot Table field to the left which says [DROP ROW FIELDS HERE]. After that, drag the same data in the pivot table field to [DROP DATA ITEMS HERE] . Pivot table will show you how many [2] ,[3] are tehre in the data.

There are lot more functions you can use in Pivot table.

I hope that helps.
2007-12-07 9:20 am
See if this works:

to count the number of 2s, you may use =countif(range of cells,2)
to count the number of 3s, you may use =countif(range of cells,3)

follow this and you can count others as well.


收錄日期: 2021-04-26 20:52:47
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20071207000051KK00197

檢視 Wayback Machine 備份