A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

counting matching multiple entries



 
 
Thread Tools Display Modes
  #1  
Old May 17th, 2009, 01:20 PM posted to microsoft.public.excel.misc
colensa
external usenet poster
 
Posts: 4
Default counting matching multiple entries

I have two columns containing numbers.
I want to count the frequency with which the two columns' numbers match i.e.
the number of times 5,9 or 6,8 or 13,21 etc etc crop up (sports scores) and
leave the spreadsheet showing each unique number combination and the number
of times it occurs. Can I do this in one operation?

Colensa
  #2  
Old May 17th, 2009, 02:21 PM posted to microsoft.public.excel.misc
Gary''s Student
external usenet poster
 
Posts: 7,584
Default counting matching multiple entries

I would use a pivot table. For example, with data in A2 thru B31, in C2 enter:
=A2 & "," & B2 and copy down. We get something like:

first second combo
3 4 3,4
4 8 4,8
6 4 6,4
2 10 2,10
4 9 4,9
2 8 2,8
9 2 9,2
2 10 2,10
7 3 7,3
5 4 5,4
9 3 9,3
6 1 6,1
1 6 1,6
8 7 8,7
3 9 3,9
2 2 2,2
9 1 9,1
9 4 9,4
5 7 5,7
4 10 4,10
5 3 5,3
9 1 9,1
7 7 7,7
10 10 10,10
3 9 3,9
7 10 7,10
6 7 6,7
2 3 2,3
9 5 9,5
1 8 1,8

Then create a pivot table listing Count of combo By combo. The result:

Count of combo
combo Total
1,6 1
1,8 1
10,10 1
2,10 2
2,2 1
2,3 1
2,8 1
3,4 1
3,9 2
4,10 1
4,8 1
4,9 1
5,3 1
5,4 1
5,7 1
6,1 1
6,4 1
6,7 1
7,10 1
7,3 1
7,7 1
8,7 1
9,1 2
9,2 1
9,3 1
9,4 1
9,5 1

Pivot table is nice because it creates the table of unique combos and lists
the number of times each combo occurs in one go. For more info:

http://www.contextures.com/xlPivot01.html
--
Gary''s Student - gsnu200853


"colensa" wrote:

I have two columns containing numbers.
I want to count the frequency with which the two columns' numbers match i.e.
the number of times 5,9 or 6,8 or 13,21 etc etc crop up (sports scores) and
leave the spreadsheet showing each unique number combination and the number
of times it occurs. Can I do this in one operation?

Colensa

  #3  
Old May 17th, 2009, 09:11 PM posted to microsoft.public.excel.misc
Bernd P
external usenet poster
 
Posts: 613
Default counting matching multiple entries

Hello,

Select an area of 3 columns and enough rows and array-enter:
=Pfreq(A1:A100,B1:B100)
for example, if your two columns are A and B (data in rows 1 to 100).

My UDF Pfreq you can find he
http://www.sulprobil.com/html/pfreq.html

Regards,
Bernd
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:23 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.