Count Names Based on Three Criteria

BYates123

New Member
Joined
Jun 17, 2011
Messages
24
I need to count names based on three different criteria. Column A lists employee names, Column B lists the month, Column C lists the year. I need to count the number of names that occur each month for every year, but each name can only be counted once. For example, I need to know how many names are listed under March, 2012, but I can only count that name if it is not used in January or February of 2012. This criteria for unique names only applies for the year, so if a name is listed only once in 2012 and 2013 then it is still unique for each respective year.

I tried the following use of "countifs", but wasn't sure how to create a code to satisfy the third criteria, which is that the name is not repeated previously in the calendar year. I feel like it shouldn't be too difficult but I can't figure it out!

Code:
<code>=countifs(C:C,"2012",B:B,"Mar",A:A...????</code>
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Have you thought of doing a pivot table and viewing the data like this?

There are a number of ways
You could have Years and Months on the left and names across the top. With say a count of Names as your values and then do a =COUNTIF(C6:H6,">"&1)

Count of NameColumn Labels
Row LabelsBOPHXSKGZRKMVPHXRLGrand Total
2012221117
Jan213
Feb112
Mar112
20132114
Jan112
Feb11
Mar11
Grand Total23212111

<colgroup><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
 
Last edited:
Upvote 0
Have you thought of doing a pivot table and viewing the data like this?

There are a number of ways
You could have Years and Months on the left and names across the top. With say a count of Names as your values and then do a =COUNTIF(C6:H6,">"&1)

Count of NameColumn Labels
Row LabelsBOPHXSKGZRKMVPHXRLGrand Total
2012221117
Jan213
Feb112
Mar112
20132114
Jan112
Feb11
Mar11
Grand Total23212111

<tbody>
</tbody>

Sorry that countif should be =COUNTIF(b6:G6,">"&0)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,203,752
Messages
6,057,150
Members
444,908
Latest member
Jayrey

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