Count unique values that match 2 or more criteria

caeiro01

New Member
Joined
Oct 24, 2015
Messages
7
Hi all,

i need count the number of persons assign to some tasks in one particular day.
Ex. how many persons made the task "a" and "c" on the 24-10-2015?

the answer should be 5

tks
Antonio

nameStatusprocess24-10-201525-10-2015
AnneActuala11
JoeActuala13
MaryActuala
RichardActuala
JoeActuala
MagdalenaActuala1
AnthonyActuala12
AnneActualb11
JoeActualb3
AnneActualb
MaryActualb21
JohnActualb1
MagdalenaActualb31
AnthonyActualb12
AnneActualc33
JoeActualc2
AnneActualc1
MaryActualc3
JohnActualc1
MagdalenaActualc22
AnthonyActualc2

<tbody>
</tbody>
 
Hi Matty,

tks, this is brilliant.
However, i'm only missing one thing. I need the formula to select the date column that is mentioned in cell H1 (in this case, is 24/10/2015, but if would be 25/10/2015, the formula shoud search in E2:E22)

tks for the help
Antonio

Try:

Code:
=SUM(IF(FREQUENCY(IF(A2:A22<>"",IF(ISNUMBER(MATCH(C2:C22,{"a","c"},0)),IF(INDEX(D2:E22,,MATCH("24/10/2015"+0,D1:E1,0))>0,MATCH(A2:A22,A2:A22,0)))),ROW(A2:A22)-ROW(A2)+1)>0,1))

Submitted with CTRL+SHIFT+ENTER.

To be honest, we'd be much better using Worksheet cells rather than hard coding values into the formula itself. An example of this would be:

Code:
=SUM(IF(FREQUENCY(IF(A2:A22<>"",IF(ISNUMBER(MATCH(C2:C22,[COLOR=#ff0000]G2:G3[/COLOR],0)),IF(INDEX(D2:E22,,MATCH([COLOR=#ff0000]H2[/COLOR],D1:E1,0))>0,MATCH(A2:A22,A2:A22,0)))),ROW(A2:A22)-ROW(A2)+1)>0,1))

Where G2:G3 contains the Statuses of interest and H2 contains the Date of interest. Again, the formula needs submitting with CTRL+SHIFT+ENTER.

Matty
 
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Or a shorter version using offset.......

=SUM(IF(FREQUENCY(IF(C2:C22={"a","c"},IF(OFFSET(C2,,MATCH(H1,D1:E1,0),21,)>0,MATCH(A2:A22,A2:A22,0))),ROW(A1:A21))>0,1))
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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