Formulae to count employees monthly

eagle028

New Member
Joined
May 28, 2005
Messages
49
Hi

I've a workbook with 2 sheets in it: in 1 there's information such as below
- employee name, country, contract type, date join and date left e.g.

Last Name First Name Start Date End Date Ctry Contract Type
Li ABC 01-Feb-11 31-Dec-11 China Full Time
Shan XYZ 01-Mar-11 31-May-11 China Part Time
Doe Joe 01-Jun-11 30-Jun-11 Australia Contract
Chandra Raj 05-Jul-11 31-Dec-12 India Full Time

in the other spreadsheet, in the 1st column there's the month of headcount and the countries in the columns and different contract type on the rows e.g.
June-11 Australia China India Japan
Full Time
Part Time
Contract
Total

So what i need is a formulae that will help me count the number of employees (that are still active) in June 11 in each country for each contract type.

Also, if i want to use "Name" for the columns under the 1st spreadsheet, how do i do that? Do i name the whole column or just the header of the column?

Please HELP!

Thanks!
 
Last edited:

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi

Anybody can help me urgently on this? I really need to complete this work so i need the result to show as that in June 11:

China has 1 Full Time
Australia has 1 Contract

Then in July
China & India has 1 Full Time
Australia has 1 Contract

and so on & so forth for the coming months.

Sorry i don't seem to be able to copy a nice table into this post to show the e.g
 
Upvote 0
Hi,

Is this how your data is set up?...


Excel Workbook
ABCDEF
1Last NameFirst NameStart DateEnd DateCtryContract Type
2LiABC01/02/201131/12/2011ChinaFull Time
3ShanXYZ01/03/201131/05/2011ChinaPart Time
4DoeJoe01/06/201130/06/2011AustraliaContract
5ChandraRaj05/07/201131/12/2012IndiaFull Time
Employees



Is this the result you are expecting for June?.....


Excel Workbook
ABCDE
1June 11AustraliaChinaIndiaJapan
2Full Time0110
3Part Time0000
4Contract1000
5Total1110
6*****
7For Excel 2007-2010****
8June 11AustraliaChinaIndiaJapan
9Full Time0110
10Part Time0000
11Contract1000
12Total1110
Results



The formulas will need to be copied across and down.
I hope that helps.

Ak
 
Upvote 0
Hi AK

Thanks a lot for your reply.

However for the month of Jun 11, results should be
China ----> 1 Full time
Australia -> 1 Contract

There is no count for India as full time employee only starts in July 11.

Then in July 11, results should be
China --> 1 Full time
India ---> 1 Full time

There is no count for Australia as employee's last day was 30 Jun 11

I'm using SUMIF & have gotten it so far as: {=SUM (IF('Ctry'="China", 1,0), IF('Contract Type'="Full Time",1,0))}

I just can't figure out the date range part

Please help advise

Thanks a lot!
 
Upvote 0
Hi,

Does this work for you?..

Excel Workbook
ABCDE
1June 11AustraliaChinaIndiaJapan
2Full Time0100
3Part Time0000
4Contract1000
5Total1100
Results


Excel Workbook
ABCDE
1July 11AustraliaChinaIndiaJapan
2Full Time0110
3Part Time0000
4Contract0000
5Total0110
Results


The date in A1 has been entered as the last day of the month 30/06/11 of 31/06/11 and formatted as mmmm yy

Ak
 
Upvote 0
Hi AK

I tried this but somehow i get "N/A" on some cells for July 2011 and it seems to be the date part of the fomulae. I can't paste my excel to show you here.

My formulae is =SUMPRODUCT(($F10:$F13=D$21)*($G10:$G13=C$24)*($E$9:$E$13>=$B$21)*($D$9:$D$13<=$B$21))

Where $F$10:F$13 is Ctry & D$21 is Australia; $G10:$G13 is Contract Type & C$24 is Contract; $E$9:$E$13 is End date &$B$21 is July 2011; $D$9:$D$13 is Start date.

Would you be able to advise?

Thanks so much!
 
Upvote 0
Is this what you have?.....


Excel Workbook
BCDEFG
9Last NameFirst NameStart DateEnd DateCtryContract Type
10LiABC01/02/201131/12/2011ChinaFull Time
11ShanXYZ01/03/201131/05/2011ChinaPart Time
12DoeJoe01/06/201130/06/2011AustraliaContract
13ChandraRaj05/07/201131/12/2012IndiaFull Time
Employees



I get this ....


Excel Workbook
CDEFG
21July 11AustraliaChinaIndiaJapan
22Full Time0110
23Part Time0000
24Contract0000
25Total0110
Results



All I can suggest is that you make sure that all your ranges are the same within the sumproduct formula, you cannot have something like this....

=SUMPRODUCT(($F10:$F13=D$21)*($G10:$G13=C$24)*($E$9:$E$13>=$B$21)*($D$9:$D$13<=$B$21))

I hope that solves it for you.

Ak
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

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