# Formula t count number of employees for each month

1. ## Formula t count number of employees for each month

Hello:

I have payroll info as shown.
I need formula in cell H2 to S2 to give unique employees for given month.

Please let me know if you have any questions.
Thanks.

Riz

2. ## Re: Formula t count number of employees for each month

Hi - you want to count the number of employees in each month? 36 in Jan, 43 in Feb,etc.

3. ## Re: Formula t count number of employees for each month

=COUNT(1/FREQUENCY(IF(\$A\$2:\$A\$410>=--(1&H1),IF(\$A\$2:\$A\$410<EDATE(1&H1,1),MATCH(\$B\$2:\$B\$410,\$B\$2:\$B\$410,))),ROW(\$A\$2:\$E\$410)-ROW(\$A\$1)))

or

=COUNT(1/FREQUENCY(IF(\$D\$2:\$D\$410=H1,MATCH(\$B\$2:\$B\$410,\$B\$2:\$B\$410,)),ROW(\$A\$2:\$E\$410)-ROW(\$A\$1)))

Confirm by Ctrl+Shift+Enter

or Normal Enter but calculate slower than FREQUENCY
select H2:S2
enter formula
=SUMPRODUCT((Table1[Month]=H1)/COUNTIFS(Table1[Name],Table1[Name],Table1[Month],Table1[Month]))

Press Ctrl+Enter

4. ## Re: Formula t count number of employees for each month

Hello Bo_Ry

Very complicated formula but it works

Thanks a lot

Roz

5. ## Re: Formula t count number of employees for each month

Riz,

Power Query Solution

``Please Login or Register  to view this content.``
Excel 2016 (Windows) 32 bit
A
B
1
Month Total By Month
2
Jan
23
3
Feb
23
4
Mar
25
5
Apr
23
6
May
25
7
Jun
26
8
Jul
26
9
Aug
24
10
Sep
23
 Sheet: Sheet2

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1