Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ert Ert is offline
external usenet poster
 
Posts: 1
Default Count unique values across two columns with multiple conditions

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.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Count unique values across two columns with multiple conditions

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,)*MA TCH(School,School,)),MATCH(Class,Class,)*MATCH(Sch ool,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.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Count unique values across two columns with multiple condition

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,)*MA TCH(School,School,)),MATCH(Class,Class,)*MATCH(Sch ool,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,)*MA TCH(School,School,)),MATCH(Class,Class,)*MATCH(Sch ool,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.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 265
Default Count unique values across two columns with multiple conditions

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 ,
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.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default Count unique values across two columns with multiple conditions

Hello,

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

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

Regards,
Bernd
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
Filter for unique values in multiple columns sahafi Excel Discussion (Misc queries) 6 October 24th 08 09:05 PM
Count unique values based on multiple criteria Nip Excel Discussion (Misc queries) 2 November 2nd 06 03:41 AM
Count Unique Values with Multiple Criteria JohnV Excel Worksheet Functions 3 April 17th 06 06:00 PM
how to count unique values in excel based on multiple criteria IDBUGM Excel Worksheet Functions 3 March 15th 06 04:00 PM
Advanced unique cell count with multiple conditions ... help! Flystar Excel Worksheet Functions 3 September 25th 05 03:50 AM


All times are GMT +1. The time now is 05:52 AM.

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

About Us

"It's about Microsoft Excel"