Countif with various/multiple criteria

dancing-shadow

New Member
Joined
Dec 4, 2011
Messages
24
Apologies if this is simple and/or covered elsewhere, I'm not sure of what to search for to get what I'm after!

Below is an example of my dummy file (apparently I can't add attachments)

[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Project[/TD]
[TD]Office[/TD]
[/TR]
[TR]
[TD]Jim[/TD]
[TD]Alpha[/TD]
[TD]London[/TD]
[/TR]
[TR]
[TD]Jim[/TD]
[TD]Alpha[/TD]
[TD]London[/TD]
[/TR]
[TR]
[TD]Sandra[/TD]
[TD]Alpha[/TD]
[TD]London[/TD]
[/TR]
[TR]
[TD]Jim[/TD]
[TD]Omega[/TD]
[TD]London[/TD]
[/TR]
[TR]
[TD]Jim[/TD]
[TD]Omega[/TD]
[TD]London[/TD]
[/TR]
[TR]
[TD]Carl[/TD]
[TD]Omega[/TD]
[TD]London[/TD]
[/TR]
[TR]
[TD]Sue[/TD]
[TD]Omega[/TD]
[TD]London[/TD]
[/TR]
</tbody>[/TABLE]

I have one big table of basic data all split by manager, project and office. I'm trying to find out the number of people who have worked on which project (or both) from a specific office. This is what I want to acheve:

Total people in London office: 4
Total people on Alpha project only in London: 1 (Sandra)
Total people on Omega project only in London: 2 (Carl and Sue)
Total people on BOTH projects: 1 (Jim)

I've been working on the below code to extract the unique count of total people per office - not sure if I can use it for the other numbers though...

Code:
<code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit; line-height: 12px;">{=SUM(--(FREQUENCY(IF($D$19:$D$509="London",MATCH($B$19:$B$509,$B$19:$B$509,0)),ROW($B$19:$B$509)-ROW($B$19)+1)>0))}</code>
 
Last edited:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,226,729
Messages
6,192,696
Members
453,747
Latest member
tylerhyatt04

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