Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Distinct Counts with Multiple Criteria

Each month we produce a complex report in Excel using thousands of rows of
data. We've just been asked to add in a new table which needs to use
distinct counts based on multiple criteria. I've included an example of the
data below. How can I create a formula to complete the results table as I
have manually entered below?

A B C D
1 NAME DEPT LOCATION TYPE
2 Mary Finance A Primary
3 Sally Finance B Primary
4 Sally Finance B Primary
5 Mary IT A Primary
6 John Finance B Secondary
7 John Finance B Secondary
8 David Admin A Primary
9 John IT B Secondary
10 David Finance A Primary
11 David IT C Primary
12
13
14 Results Table for Locations A & B
15 DEPT Primary Secondary
16 Finance 3 1
17 Admin 1 0
18 IT 1 1

Thanks
BT
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Distinct Counts with Multiple Criteria

Please note that this is an array formula.You create array formulas in the
same way that you create other formulas, except you press CTRL+SHIFT+ENTER to
enter the formula. If successful in 'Formula Bar' you can notice the curly
braces at both ends like "{=<formula}"

=SUM(IF(FREQUENCY(IF((A2:A11<"")*(B2:B11="Finance ")*
(D2:D11="Primary"),MATCH(A2:A11,A2:A11,0)),
ROW(A2:A11)-ROW(A2)+1),1))

--
Jacob (MVP - Excel)


"Bentam3" wrote:

Each month we produce a complex report in Excel using thousands of rows of
data. We've just been asked to add in a new table which needs to use
distinct counts based on multiple criteria. I've included an example of the
data below. How can I create a formula to complete the results table as I
have manually entered below?

A B C D
1 NAME DEPT LOCATION TYPE
2 Mary Finance A Primary
3 Sally Finance B Primary
4 Sally Finance B Primary
5 Mary IT A Primary
6 John Finance B Secondary
7 John Finance B Secondary
8 David Admin A Primary
9 John IT B Secondary
10 David Finance A Primary
11 David IT C Primary
12
13
14 Results Table for Locations A & B
15 DEPT Primary Secondary
16 Finance 3 1
17 Admin 1 0
18 IT 1 1

Thanks
BT

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
Distinct Count with Criteria Bentam3 Excel Discussion (Misc queries) 3 May 27th 10 08:53 PM
Is there a function that counts distinct number od records in a ra Ayo Excel Worksheet Functions 3 March 19th 10 09:01 PM
Sumproduct Formula to counts multiple criteria in two columns? EricB Excel Worksheet Functions 1 November 19th 08 10:24 AM
Counts for Excel 2003 using multiple criteria [email protected] Excel Worksheet Functions 6 October 10th 07 08:36 PM
Counts/Percents Multiple Criteria Michael Excel Worksheet Functions 2 January 31st 06 08:55 PM


All times are GMT +1. The time now is 10:35 PM.

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"