LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default Counting unique entries based on given condition

Hey, Domenic


=COUNT(1/FREQUENCY(IF($B$2:$B$5=E2,IF($A$2:$A$5<"",MATCH($ A$2:$A$5,$A$2:$A$5,0))),ROW($A$2:$A$5)-ROW($A$2)+1))

After looking at THAT formula....I don't know what in world drove me to use
the clunky approach I used!

Nice work.
***********
Best Regards,
Ron

XL2002, WinXP


"Domenic" wrote:

In article .com,
"Hari" wrote:

Are there pure formula based solutions to this problem (without using
pivots). Probably some variation of an array sumproduct along with
"embedded" countif kind of formula?


Assuming that A2:C5 contains the data, let E2 and E3 contain x and y,
respectively, then try the following...

For a unique count, if you download and install the free add-in
Morefunc.xll...

F2, confirmed with CONTROL+SHIFT+ENTER, and copied down:

=COUNTDIFF(IF($B$2:$B$5=E2,$A$2:$A$5,0),FALSE,0)

Otherwise...

F2, confirmed with CONTROL+SHIFT+ENTER, and copied down:

=COUNT(1/FREQUENCY(IF($B$2:$B$5=E2,IF($A$2:$A$5<"",MATCH($ A$2:$A$5,$A$2:
$A$5,0))),ROW($A$2:$A$5)-ROW($A$2)+1))

To sum units...

G2, copied down:

=SUMIF($B$2:$B$5,E2,$C$2:$C$5)

Hope this helps!

 
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 Entries SouthCarolina Excel Discussion (Misc queries) 7 April 14th 06 01:18 PM
Counting unique text entries in a filtered list... SOS Excel Worksheet Functions 4 April 5th 06 05:31 PM
Counting Unique Values RJL0323 Excel Worksheet Functions 27 February 19th 06 09:12 PM
Best way to get a list of unique entries in a field [email protected] Excel Worksheet Functions 2 January 19th 06 10:30 PM
counting unique entries in a list Michael Excel Discussion (Misc queries) 1 November 10th 05 03:00 PM


All times are GMT +1. The time now is 03:22 PM.

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"