Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Count Distinct

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Johnny" wrote in message
...
That worked. Thank you so much.

I accidently click on "No" to the question on whether your post was
helpful.
Sorry about that. Your post was very very helpful.

"T. Valko" wrote:

Try this...

A1 = lower date boundary
A3 = upper date boundary
A3 = some city

In the formula:

City refers to the range that contains the city names
Emp refers to the range that contains the employee names
Date refers to the range that contains the dates

Array entered** :

=SUM(IF(FREQUENCY(IF(City=A3,IF(Date=A1,IF(Date<= A2,MATCH(Emp,Emp,0)))),ROW(Emp)-MIN(ROW(Emp))+1),1))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the
SHIFT
key then hit ENTER.

Assumes there are no empty cells in the Employee range.

--
Biff
Microsoft Excel MVP


"Johnny" wrote in message
...
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.



.



 
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
How do I set up Distinct Count in a Pivot Table? STOFF Excel Discussion (Misc queries) 1 April 18th 06 06:23 PM
How do I count distinct names? Rona Excel Worksheet Functions 8 March 9th 06 02:22 AM
Count Distinct only John Moore Excel Discussion (Misc queries) 4 November 25th 05 11:47 AM
Count Distinct Values? bill_morgan Excel Worksheet Functions 7 April 27th 05 02:12 AM
Count distinct Debbie t Excel Worksheet Functions 2 November 3rd 04 08:42 PM


All times are GMT +1. The time now is 12:04 AM.

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

About Us

"It's about Microsoft Excel"