#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 45
Default Count unique

I am trying to count the number of unique job numbers that have the category
= countertops and the sub-category=granite.
Note: job 20470098 has 2 instances of Granite, i only want to count this
once. i am trying to identify the number of jobs that have used this
category.

This formula
{Sum((B2:B1000="Countertops")*(C2:C1000="Granite") )}
returns the result 5 since there are 5 instances of Countertops-Granite. i
am looking for the result 4 since there are only 4 jobs that have this
category-subcategory, one just happens to have it twice and i dont need to
count it twice.
Thank you.

Job Category Sub-Category
20470071 Countertops Granite
20470071 Countertops Marble
20470098 Countertops Granite
20470098 Countertops Granite
20470098 Countertops Marble
20470106 Countertops Granite
20470109 Countertops Granite
20470109 Countertops Marble
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Count unique

One way,
{=SUM((B2:B1000="Countertops")*(C2:C1000="Granite" )/IF(COUNTIF(A2:A1000,A2:A1000)=0,0.1,COUNTIF(A2:A10 00,A2:A1000))){

Just as an FYI, the 0.1 in the IF statement is simply to avoid XL thinking
there's an Div/0 error, when in reality the math operation is 0/0.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Spencer Hutton" wrote:

I am trying to count the number of unique job numbers that have the category
= countertops and the sub-category=granite.
Note: job 20470098 has 2 instances of Granite, i only want to count this
once. i am trying to identify the number of jobs that have used this
category.

This formula
{Sum((B2:B1000="Countertops")*(C2:C1000="Granite") )}
returns the result 5 since there are 5 instances of Countertops-Granite. i
am looking for the result 4 since there are only 4 jobs that have this
category-subcategory, one just happens to have it twice and i dont need to
count it twice.
Thank you.

Job Category Sub-Category
20470071 Countertops Granite
20470071 Countertops Marble
20470098 Countertops Granite
20470098 Countertops Granite
20470098 Countertops Marble
20470106 Countertops Granite
20470109 Countertops Granite
20470109 Countertops Marble

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count unique

That returns an incorrect result.

Try this array formula** :

=COUNT(1/FREQUENCY(IF((B2:B1000="countertops")*(C2:C1000="g ranite"),A2:A1000),A2:A1000))

Better to use cells to hold the criteria:

E2 = Countertops
F2 = Granite

=COUNT(1/FREQUENCY(IF((B2:B1000=E2)*(C2:C1000=F2),A2:A1000) ,A2:A1000))

** 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


"Luke M" wrote in message
...
One way,
{=SUM((B2:B1000="Countertops")*(C2:C1000="Granite" )/IF(COUNTIF(A2:A1000,A2:A1000)=0,0.1,COUNTIF(A2:A10 00,A2:A1000))){

Just as an FYI, the 0.1 in the IF statement is simply to avoid XL thinking
there's an Div/0 error, when in reality the math operation is 0/0.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Spencer Hutton" wrote:

I am trying to count the number of unique job numbers that have the
category
= countertops and the sub-category=granite.
Note: job 20470098 has 2 instances of Granite, i only want to count this
once. i am trying to identify the number of jobs that have used this
category.

This formula
{Sum((B2:B1000="Countertops")*(C2:C1000="Granite") )}
returns the result 5 since there are 5 instances of Countertops-Granite.
i
am looking for the result 4 since there are only 4 jobs that have this
category-subcategory, one just happens to have it twice and i dont need
to
count it twice.
Thank you.

Job Category Sub-Category
20470071 Countertops Granite
20470071 Countertops Marble
20470098 Countertops Granite
20470098 Countertops Granite
20470098 Countertops Marble
20470106 Countertops Granite
20470109 Countertops Granite
20470109 Countertops Marble



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 45
Default Count unique

that returned 2.6667 not 5. does it matter that there are blank rows included?

"Luke M" wrote:

One way,
{=SUM((B2:B1000="Countertops")*(C2:C1000="Granite" )/IF(COUNTIF(A2:A1000,A2:A1000)=0,0.1,COUNTIF(A2:A10 00,A2:A1000))){

Just as an FYI, the 0.1 in the IF statement is simply to avoid XL thinking
there's an Div/0 error, when in reality the math operation is 0/0.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Spencer Hutton" wrote:

I am trying to count the number of unique job numbers that have the category
= countertops and the sub-category=granite.
Note: job 20470098 has 2 instances of Granite, i only want to count this
once. i am trying to identify the number of jobs that have used this
category.

This formula
{Sum((B2:B1000="Countertops")*(C2:C1000="Granite") )}
returns the result 5 since there are 5 instances of Countertops-Granite. i
am looking for the result 4 since there are only 4 jobs that have this
category-subcategory, one just happens to have it twice and i dont need to
count it twice.
Thank you.

Job Category Sub-Category
20470071 Countertops Granite
20470071 Countertops Marble
20470098 Countertops Granite
20470098 Countertops Granite
20470098 Countertops Marble
20470106 Countertops Granite
20470109 Countertops Granite
20470109 Countertops Marble

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Count unique

Hi,

It works for me with blanks in columns A, B or C.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Spencer Hutton" wrote:

that returned 2.6667 not 5. does it matter that there are blank rows included?

"Luke M" wrote:

One way,
{=SUM((B2:B1000="Countertops")*(C2:C1000="Granite" )/IF(COUNTIF(A2:A1000,A2:A1000)=0,0.1,COUNTIF(A2:A10 00,A2:A1000))){

Just as an FYI, the 0.1 in the IF statement is simply to avoid XL thinking
there's an Div/0 error, when in reality the math operation is 0/0.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Spencer Hutton" wrote:

I am trying to count the number of unique job numbers that have the category
= countertops and the sub-category=granite.
Note: job 20470098 has 2 instances of Granite, i only want to count this
once. i am trying to identify the number of jobs that have used this
category.

This formula
{Sum((B2:B1000="Countertops")*(C2:C1000="Granite") )}
returns the result 5 since there are 5 instances of Countertops-Granite. i
am looking for the result 4 since there are only 4 jobs that have this
category-subcategory, one just happens to have it twice and i dont need to
count it twice.
Thank you.

Job Category Sub-Category
20470071 Countertops Granite
20470071 Countertops Marble
20470098 Countertops Granite
20470098 Countertops Granite
20470098 Countertops Marble
20470106 Countertops Granite
20470109 Countertops Granite
20470109 Countertops Marble

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
count unique MAANI Excel Worksheet Functions 4 October 22nd 08 06:02 AM
count unique MAANI Excel Worksheet Functions 3 October 22nd 08 04:42 AM
Attempting to sort unique/only count first record in each unique g MJW[_2_] Excel Discussion (Misc queries) 3 August 10th 07 02:56 PM
Count # of unique occurances sharder Excel Worksheet Functions 3 June 29th 06 05:12 AM
Count Unique Entries SouthCarolina Excel Worksheet Functions 4 April 14th 06 11:44 PM


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