Formula to count leaves in a month

vinod9111

Active Member
Joined
Jan 21, 2009
Messages
426
Hi All,

Below is the data of the staff who has taken leave on the below dates. I need a formula which can cull out month wise , staff wise leave taken.

Data
DateStaffLeave taken
03-Apr-18AA1
06-Apr-18BB1
18-Apr-18EE1
06-Apr-18BB1
24-Apr-18BB1
02-May-18CC1
27-Apr-18CC1
28-Apr-18EE1
30-Apr-18EE1
01-May-18CC1
09-May-18CC1
09-May-18DD1
11-May-18EE1
14-May-18DD1
15-May-18DD1
16-May-18DD1
17-May-18DD1

<colgroup><col><col><col></colgroup><tbody>
</tbody>

Output expected
MonthAABBCCDDEE
April131 3
May 351

<colgroup><col width="64" span="6" style="width:48pt"> </colgroup><tbody>
</tbody>

Any help will be appreciated.

regards

Vinod
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Place the first table into A1:C18. The second table into A21:F23. In B22 place:

=COUNTIFS($A$2:$A$18,">="&"1"&$A22&YEAR(TODAY()),$A$2:$A$18,"<"&EDATE("1"&$A22&YEAR(TODAY()),1),$B$2:$B$18,B$21)
 
Upvote 0
And if you need a sum of leave taken its:

=SUMIFS($C$2:$C$18,$A$2:$A$18,">="&"1"&$A22&YEAR(TODAY()),$A$2:$A$18,"<"&EDATE("1"&$A22&YEAR(TODAY()),1),$B$2:$B$18,B$21)
 
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
Members
449,075
Latest member
staticfluids

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