Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 83
Default counting unique values conditionally

hello,
let's say I wanted to count the number of names that appear in column A only
during the month of January in Column B. However I do not want to count each
name more than once. Like below, I would only like to count Jim's name once
so the answer would be 2 (Jim and Steve).

col. A col. B
Jim 1/05/09
Dan 2/11/09
Steve 1/28/09
Jim 1/16/09

Please Help!
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default counting unique values conditionally

One try:
=SUMPRODUCT((A1:A10<"")*(TEXT(B1:B10,"mmmyy")="Ja n09")/COUNTIF(A1:A10,A1:A10&""))

Success? Click YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,500 Files:370 Subscribers:66
xdemechanik
---
"jake" wrote:
let's say I wanted to count the number of names that appear in column A only
during the month of January in Column B. However I do not want to count each
name more than once. Like below, I would only like to count Jim's name once
so the answer would be 2 (Jim and Steve).

col. A col. B
Jim 1/05/09
Dan 2/11/09
Steve 1/28/09
Jim 1/16/09

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 73
Default counting unique values conditionally

That will return an incorrect result if a name is associated with dates from
different months. For example, using the OP's sample data change one of Jim's
dates to a different month.

Try this array formula** :

Assuming no empty cells in either column of data.

=COUNT(1/FREQUENCY(IF(MONTH(B2:B5)=1,MATCH(A2:A5,A2:A5,0)), ROW(A2:A5)-ROW(A2)+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.

--
Biff
Microsoft Excel MVP


"Max" wrote:

One try:
=SUMPRODUCT((A1:A10<"")*(TEXT(B1:B10,"mmmyy")="Ja n09")/COUNTIF(A1:A10,A1:A10&""))

Success? Click YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,500 Files:370 Subscribers:66
xdemechanik
---
"jake" wrote:
let's say I wanted to count the number of names that appear in column A only
during the month of January in Column B. However I do not want to count each
name more than once. Like below, I would only like to count Jim's name once
so the answer would be 2 (Jim and Steve).

col. A col. B
Jim 1/05/09
Dan 2/11/09
Steve 1/28/09
Jim 1/16/09

  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default counting unique values conditionally

.. That will return an incorrect result ..
Agreed. Inadequately tested.
Pl dismiss my earlier response.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,500 Files:370 Subscribers:66
xdemechanik
---
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 73
Default counting unique values conditionally

Man, I hate this web interface!


--
Biff
Microsoft Excel MVP


"Max" wrote:

.. That will return an incorrect result ..

Agreed. Inadequately tested.
Pl dismiss my earlier response.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,500 Files:370 Subscribers:66
xdemechanik
---



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 73
Default counting unique values conditionally

Man, I hate this web interface!

The thing that I find so negative about using the web interface is that you
can't easily find or watch posts that you've replied to to catch any
follow-ups that may come.

If you search on your user name the results are not sorted in any order what
so ever.


--
Biff
Microsoft Excel MVP


"T. Valko" wrote:

Man, I hate this web interface!


--
Biff
Microsoft Excel MVP


"Max" wrote:

.. That will return an incorrect result ..

Agreed. Inadequately tested.
Pl dismiss my earlier response.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,500 Files:370 Subscribers:66
xdemechanik
---

  #7   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default counting unique values conditionally

If you search on your user name the results are not sorted
in any order what so ever.


Agreed, the search feature is imperfect,
and as you observed, results are haphazardly unsorted

.. you can't easily find or watch posts that you've replied to
to catch any follow-ups that may come.


There's actually a notification feature "Notify me of replies" that you can
activate when you respond in the web interface. Or, activate even when you
have just a 3rd party interest in the thread/discussion (ie being neither
the OP nor responder). This feature works fairly ok from my experience when
the interface is stable, and one can simply click on the link in the email
notification received to zap directly to that particular thread.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,500 Files:370 Subscribers:66
xdemechanik
---


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default counting unique values conditionally

"Notify me of replies"

Yeah, I figured that out after the fact!

when the interface is stable


Lately, that's not very often!

Thanks, Max!

--
Biff
Microsoft Excel MVP


"Max" wrote in message
...
If you search on your user name the results are not sorted
in any order what so ever.


Agreed, the search feature is imperfect,
and as you observed, results are haphazardly unsorted

.. you can't easily find or watch posts that you've replied to
to catch any follow-ups that may come.


There's actually a notification feature "Notify me of replies" that you
can activate when you respond in the web interface. Or, activate even when
you have just a 3rd party interest in the thread/discussion (ie being
neither the OP nor responder). This feature works fairly ok from my
experience when the interface is stable, and one can simply click on the
link in the email notification received to zap directly to that particular
thread.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,500 Files:370 Subscribers:66
xdemechanik
---



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
Counting unique values Dean Excel Discussion (Misc queries) 2 June 17th 08 11:22 AM
Counting Unique Values Paul Ferro Excel Discussion (Misc queries) 1 April 11th 07 06:12 AM
Counting Unique Values Bob Excel Worksheet Functions 38 November 1st 06 09:00 AM
Counting unique values JK57 Excel Worksheet Functions 3 July 7th 06 01:02 AM
Counting Unique Values carl Excel Worksheet Functions 9 July 25th 05 12:44 PM


All times are GMT +1. The time now is 04:33 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"