Count Distinct
--With no blank records try the below array formula which will return the
distinct count for Jan2009.
--Edit the "city"
=SUM(N(FREQUENCY(IF((TEXT(C2:C8,"mmyyyy")="012009" )*
(A2:A8="city"),MATCH(B2:B8,B2:B8,)),MATCH(B2:B8,B2 :B8,))0))
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}"
If this post helps click Yes
---------------
Jacob Skaria
"Johnny" wrote:
I've scanned through related posts with no luck. I have a production
spreadsheet with several columns of data. Here are the relevant columns (3)
for my question:
City Employee Date
I need to count the distinct number of employees based on the city and a
date range. Let's say that the date range is 1/1/09 to 1/31/09 and is in
cells A1 and A2 respectively.
Cities and Employees are duplicated multiple times. What I want to end up
with is the count of the number of emloyees for a particular City for a
given date range.
|