+ Reply to Thread
Results 1 to 19 of 19

How to calculate number of employees per department position

  1. #1
    Registered User
    Join Date
    02-18-2014
    Location
    Houston
    MS-Off Ver
    Excel 2019
    Posts
    43

    Question How to calculate number of employees per department position

    what is the formula to calculate how many employees are filled in the positions per department. See the attached spreadsheet.
    Attached Files Attached Files
    Last edited by ancherilvm; 04-24-2014 at 10:56 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How to calculate number of employees per department position

    you could just add to your sumproduct....
    =SUMPRODUCT(('Position Control'!$B:$B=B$2)*('Position Control'!$C:$C=$A8)*('Position Control'!A:A<>""))
    a word of advice though, try not to use full column references with sumproduct, it will slow things down
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How to calculate number of employees per department position

    A better option would be this...
    =COUNTIFS('Position Control'!$A:$A,"<>""",'Position Control'!$B:$B,'P#s'!B$2,'Position Control'!$C:$C,'P#s'!$A3)

  4. #4
    Registered User
    Join Date
    02-18-2014
    Location
    Houston
    MS-Off Ver
    Excel 2019
    Posts
    43

    Re: How to calculate number of employees per department position

    thanks buddy. this formula works better. but how do we eliminate the zero if no value. is there any additional we can add
    =SUMPRODUCT(('Position Control'!$B:$B=B$2)*('Position Control'!$C:$C=$A8)*('Position Control'!A:A<>""))
    Last edited by ancherilvm; 04-24-2014 at 03:26 PM.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How to calculate number of employees per department position

    If you mean you want the cell to be "blank" instead of showing 0, then maybe....
    =if(COUNTIFS('Position Control'!$A:$A,"<>""",'Position Control'!$B:$B,'P#s'!B$2,'Position Control'!$C:$C,'P#s'!$A3)=0,,"",COUNTIFS('Position Control'!$A:$A,"<>""",'Position Control'!$B:$B,'P#s'!B$2,'Position Control'!$C:$C,'P#s'!$A3))

    Again, pleease note that using full column ranges in sumproduct will slow your file down. (this is not the case with countifs though)

  6. #6
    Registered User
    Join Date
    02-18-2014
    Location
    Houston
    MS-Off Ver
    Excel 2019
    Posts
    43

    Re: How to calculate number of employees per department position

    there is a problem with this formula:
    =if(COUNTIFS('Position Control'!$A:$A,"<>""",'Position Control'!$B:$B,'P#s'!B$2,'Position Control'!$C:$C,'P#s'!$A3)=0,,"",COUNTIFS('Position Control'!$A:$A,"<>""",'Position Control'!$B:$B,'P#s'!B$2,'Position Control'!$C:$C,'P#s'!$A3))

    the massage pop up :"you have entered too many arguments for this function"

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to calculate number of employees per department position

    Like this...

    =IFERROR(1/(1/COUNTIFS('Position Control'!$B:$B,B$2,'Position Control'!$C:$C,$A8,'Position Control'!A:A,"<>")),"")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How to calculate number of employees per department position

    Sorry, I had an extra , in there

  9. #9
    Registered User
    Join Date
    02-18-2014
    Location
    Houston
    MS-Off Ver
    Excel 2019
    Posts
    43

    Re: How to calculate number of employees per department position

    Buddy. this formula work for to identify how many job title total per department. but I need to know how many employees are filled in for each job title per department. see the chart for more information. I added the current formula into the yellow columns.
    =if(COUNTIFS('Position Control'!$A:$A,"<>""",'Position Control'!$B:$B,'P#s'!B$2,'Position Control'!$C:$C,'P#s'!$A3)=0,"",COUNTIFS('Position Control'!$A:$A,"<>""",'Position Control'!$B:$B,'P#s'!B$2,'Position Control'!$C:$C,'P#s'!$A3))

    E.g.: 4B has 3 NURSE CLINICIAN I job title but only 1 employee filled. so the result would be 1.
    another way is 4B has total 19 job title but only 11 employees filled.
    so the formula should identify how many employees filled in each job title per department.
    Last edited by ancherilvm; 04-24-2014 at 11:05 PM.

  10. #10
    Registered User
    Join Date
    04-25-2014
    Location
    boulder
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: How to calculate number of employees per department position

    Dude, Excel is so complex. Thank you for posting this.

  11. #11
    Registered User
    Join Date
    02-18-2014
    Location
    Houston
    MS-Off Ver
    Excel 2019
    Posts
    43

    Re: How to calculate number of employees per department position

    Any idea about the formula

  12. #12
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: How to calculate number of employees per department position

    Pl see attached file with formula.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    02-18-2014
    Location
    Houston
    MS-Off Ver
    Excel 2019
    Posts
    43

    Re: How to calculate number of employees per department position

    Great job Srinivasamurthy. this is exactly what I was trying to figure it out.
    after I look in to the file there are many "0"'s showing. how to omit 0's if there is no value in each cell?

  14. #14
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to calculate number of employees per department position

    You can use the more efficient COUNTIFS function.

    Here's the sample file that uses the COUNTIFS function and removes all the zeros...

    Sample excel ans (1).xlsx

  15. #15
    Registered User
    Join Date
    02-18-2014
    Location
    Houston
    MS-Off Ver
    Excel 2019
    Posts
    43

    Re: How to calculate number of employees per department position

    Great job... but the total became #value! shows. see the attachemnt
    Attached Files Attached Files

  16. #16
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to calculate number of employees per department position

    In the column S formulas, replace the plus signs with commas.

    From this:

    =SUM(B3+D3+F3+H3+J3+L3+N3+P3)

    To this:

    =SUM(B3,D3,F3,H3,J3,L3,N3,P3)

  17. #17
    Registered User
    Join Date
    02-18-2014
    Location
    Houston
    MS-Off Ver
    Excel 2019
    Posts
    43

    Re: How to calculate number of employees per department position

    Great job Tony...Thank you very much...

  18. #18
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to calculate number of employees per department position

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

  19. #19
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: How to calculate number of employees per department position

    Pl see attached file.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy data into different excel files based on department number
    By balaji3081 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2013, 03:39 PM
  2. [SOLVED] Counting number of instances by department.
    By adam_crowther in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2013, 10:31 AM
  3. Replies: 3
    Last Post: 04-03-2012, 10:16 AM
  4. Replies: 16
    Last Post: 02-24-2012, 03:08 PM
  5. Calculate how much work employees can get done in a certain time
    By XLVBA in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2012, 02:52 AM

Bookmarks

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