PC Review


Reply
Thread Tools Rate Thread

Count unique values across two columns with multiple conditions

 
 
Ert
Guest
Posts: n/a
 
      5th Mar 2009
I have a large spread sheet and I want to know the total number of classes
for an area. Classes with the same title but at different HS need to be
counted seperately. For Example:
School Class Area
John HS Algebra Math
John HS Geometry Math
John HS Genetics Science
Jane HS Genetics Science
Jane HS Accounting Business
Jane HS Accounting Business

Total Unique Math Classes = 2
Total Unique Science Classes = 2
Total Unique Business Classes = 1

Thanks in advance.

 
Reply With Quote
 
 
 
 
Teethless mama
Guest
Posts: n/a
 
      5th Mar 2009
School, Class, and Area are named ranges

Criteria:
E1: holds Math
E2: holds Science
E3: holds Business

In F2:
=SUM(N(FREQUENCY(IF(Area=E2,MATCH(Class,Class,)*MATCH(School,School,)),MATCH(Class,Class,)*MATCH(School,School,))>0))

ctrl+shift+enter, not just enter
copy down



"Ert" wrote:

> I have a large spread sheet and I want to know the total number of classes
> for an area. Classes with the same title but at different HS need to be
> counted seperately. For Example:
> School Class Area
> John HS Algebra Math
> John HS Geometry Math
> John HS Genetics Science
> Jane HS Genetics Science
> Jane HS Accounting Business
> Jane HS Accounting Business
>
> Total Unique Math Classes = 2
> Total Unique Science Classes = 2
> Total Unique Business Classes = 1
>
> Thanks in advance.
>

 
Reply With Quote
 
Teethless mama
Guest
Posts: n/a
 
      5th Mar 2009
Correction:
School, class, and Area are Defined name ranges

Criteria
E2: holds Math
E3: holds Science
E4: holds Business

In F2:
=SUM(N(FREQUENCY(IF(Area=E2,MATCH(Class,Class,)*MATCH(School,School,)),MATCH(Class,Class,)*MATCH(School,School,))>0))

ctrl+shift+enter, not just enter
copy down


"Teethless mama" wrote:

> School, Class, and Area are named ranges
>
> Criteria:
> E1: holds Math
> E2: holds Science
> E3: holds Business
>
> In F2:
> =SUM(N(FREQUENCY(IF(Area=E2,MATCH(Class,Class,)*MATCH(School,School,)),MATCH(Class,Class,)*MATCH(School,School,))>0))
>
> ctrl+shift+enter, not just enter
> copy down
>
>
>
> "Ert" wrote:
>
> > I have a large spread sheet and I want to know the total number of classes
> > for an area. Classes with the same title but at different HS need to be
> > counted seperately. For Example:
> > School Class Area
> > John HS Algebra Math
> > John HS Geometry Math
> > John HS Genetics Science
> > Jane HS Genetics Science
> > Jane HS Accounting Business
> > Jane HS Accounting Business
> >
> > Total Unique Math Classes = 2
> > Total Unique Science Classes = 2
> > Total Unique Business Classes = 1
> >
> > Thanks in advance.
> >

 
Reply With Quote
 
Domenic
Guest
Posts: n/a
 
      5th Mar 2009
Assuming that A2:C7 contains the data, and E2:E4 contains Math,
Science, and Business, try...

F2, confirmed with CONTROL+SHIFT+ENTER, and copied down:

=SUM(IF(FREQUENCY(IF($C$2:$C$7=E2,MATCH("~"&$A$2:$A$7&$B$2:$B$7,$A$2:$A$7
&$B$2:$B$7&"",0)),ROW($C$2:$C$7)-ROW($C$2)+1),1))

Hope this helps!

In article <625660E1-E37B-47C7-BA64-(E-Mail Removed)>,
Ert <(E-Mail Removed)> wrote:

> I have a large spread sheet and I want to know the total number of classes
> for an area. Classes with the same title but at different HS need to be
> counted seperately. For Example:
> School Class Area
> John HS Algebra Math
> John HS Geometry Math
> John HS Genetics Science
> Jane HS Genetics Science
> Jane HS Accounting Business
> Jane HS Accounting Business
>
> Total Unique Math Classes = 2
> Total Unique Science Classes = 2
> Total Unique Business Classes = 1
>
> Thanks in advance.

 
Reply With Quote
 
Bernd P
Guest
Posts: n/a
 
      8th Mar 2009
Hello,

I suggest the array formula
=Pfreq(Pfreq(C5:C10,A5:A10,B5:B10))

Pfreq you can find here:
http://www.sulprobil.com/html/pfreq.html

Regards,
Bernd
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
count for multiple conditions in multiple columns tturklsu Microsoft Excel Worksheet Functions 2 8th Jul 2009 03:42 PM
How to count unique values with multiple criteria rover Microsoft Excel Worksheet Functions 1 24th Jun 2009 12:19 PM
Count unique entries across multiple columns Bob Phillips Microsoft Excel Programming 2 24th Mar 2008 11:26 PM
Count Unique Values with Multiple Criteria =?Utf-8?B?Sm9oblY=?= Microsoft Excel Worksheet Functions 3 17th Apr 2006 06:00 PM
Advanced unique cell count with multiple conditions ... help! Flystar Microsoft Excel Worksheet Functions 3 25th Sep 2005 03:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:36 PM.