count unique entries if criteria matches

mattmac75

New Member
Joined
Dec 13, 2013
Messages
33
How can I count the unique entries of Sheets1A:A but only when the entries of Sheets1N:N match Sheets2A3
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
How do I capture only the unique values and add them up

In the example below I would like to have a total of the unique entries in (A:A) for week 27(B:B) from Sheet1, This would be based on Sheet1 B:B entries matching
Sheet2 A1

Sheet1

A B
1 PMC15994AZ 26
2 PMC15432AZ 27
3 PMC11779AZ 27
4 PMC14694AZ 27
5 PMC14694AZ 27

Sheet 2

A B
1 27 Total number of unique values from Sheet1 A:A
 
Upvote 0
In C1 of Sheet2 control+shift+enter, not just enter:
Rich (BB code):

=SUM(IF(FREQUENCY(IF(Sheet1!$A$1:$A$5<>"",
   IF(Sheet1!$C$1:$C$5=$B1,MATCH("~"&Sheet1!$A$1:$A$5,Sheet1!$A$1:$A$5&"",0))),
   ROW(Sheet1!$A$1:$A$5)-ROW(Sheet1!$A$1)+1),1))

Adjust to suit but avoid using whole column references in this type array-processing formulas.
 
Upvote 0

Forum statistics

Threads
1,203,514
Messages
6,055,838
Members
444,828
Latest member
StaffordStag

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top