Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
bjg
 
Posts: n/a
Default frequency for each occurance


HI, I have a vector (as a column in Excel) as follows:

4
4
3
6
3
5
5
3
2
1

Now I want to calculate the frequency of each value (or occurance). I
first sort the vector as follows:

1
2
3
3
3
4
4
5
5
6

Then for the small data set I manually calculate the number of
occurance, which is follows:

1 1
2 1
3
3
3 3
4
4 2
5
5 2
6 1

Note the second column shows the number of occurance. I wonder if there
is any automatical way to do it. Many thanks.


--
bjg
------------------------------------------------------------------------
bjg's Profile: http://www.excelforum.com/member.php...o&userid=16776
View this thread: http://www.excelforum.com/showthread...hreadid=319730

  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

If you data were in col. A starting in A1 (sorted
ascending), put this in B1 and fill down:

=IF(A1=A2,"",COUNTIF(A:A,A1))

HTH
Jason
Atlanta, GA

-----Original Message-----

HI, I have a vector (as a column in Excel) as follows:

4
4
3
6
3
5
5
3
2
1

Now I want to calculate the frequency of each value (or

occurance). I
first sort the vector as follows:

1
2
3
3
3
4
4
5
5
6

Then for the small data set I manually calculate the

number of
occurance, which is follows:

1 1
2 1
3
3
3 3
4
4 2
5
5 2
6 1

Note the second column shows the number of occurance. I

wonder if there
is any automatical way to do it. Many thanks.


--
bjg
---------------------------------------------------------

---------------
bjg's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=16776
View this thread:

http://www.excelforum.com/showthread...hreadid=319730

.

  #3   Report Post  
bjg
 
Posts: n/a
Default


HI, I applied =IF(A1=A2;COUNTIF(A:A;A1);"") (NOTE: semcolon rather than
comma initally suggested), and it ends up with the following outcome,

1
2
3 3
3 3
3
4 2
4
5 2
5
6

which is not correct. A correct answer should be
1 1
2 1
3 3
3
3
4 2
4
5 2
5
6 1

Any comments are welcome!


--
bjg
------------------------------------------------------------------------
bjg's Profile: http://www.excelforum.com/member.php...o&userid=16776
View this thread: http://www.excelforum.com/showthread...hreadid=319730

  #4   Report Post  
N Harkawat
 
Posts: n/a
Default

Assuming your list begins at A2 type the following and copy it down
=IF(AND(COUNTIF(A:A,A2)1,SUMIF($A$1:A1,A2,$B$1:B1 )1),"",COUNTIF(A:A,A2))

"bjg" wrote in message
...

HI, I applied =IF(A1=A2;COUNTIF(A:A;A1);"") (NOTE: semcolon rather than
comma initally suggested), and it ends up with the following outcome,

1
2
3 3
3 3
3
4 2
4
5 2
5
6

which is not correct. A correct answer should be
1 1
2 1
3 3
3
3
4 2
4
5 2
5
6 1

Any comments are welcome!


--
bjg
------------------------------------------------------------------------
bjg's Profile:

http://www.excelforum.com/member.php...o&userid=16776
View this thread: http://www.excelforum.com/showthread...hreadid=319730



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying frequency polygons in Excel (Statistics) Maxiem Charts and Charting in Excel 3 January 17th 05 11:45 PM
Times and Frequency? Jim Excel Discussion (Misc queries) 3 December 2nd 04 06:36 PM
how can I create a histogram with relative frequency? phong Excel Discussion (Misc queries) 1 November 30th 04 08:24 AM


All times are GMT +1. The time now is 02:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"