+ Reply to Thread
Results 1 to 8 of 8

Using COUNTIFS to Determine Personnel Absence

  1. #1
    Registered User
    Join Date
    01-02-2017
    Location
    Cambridge, England
    MS-Off Ver
    Office 2016 Mac
    Posts
    4

    Using COUNTIFS to Determine Personnel Absence

    Hi All. Thank you for taking the time to read this post.

    I am attempting to use the COUNTIFS function to determine the number of working days that employees are working each month. However, the function does not return a valid number. There are three worksheets.

    The first includes the working days for the month.

    Screen Shot 2017-01-03 at 03.48.03.png

    The second includes data exported from a door card system (which employees swipe both when leaving and entering the premises).

    Screen Shot 2017-01-03 at 03.48.28.png

    The third worksheet attempts to count the number of days on which employees have made at least one contact with the door card system.

    Screen Shot 2017-01-03 at 03.48.50.png

    It would be really helpful if any one has a moment to look at this and let me know what I am doing wrong here.

    Many thanks in advance.
    Last edited by orientalist; 01-03-2017 at 04:05 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Using COUNTIFS to Determine Personnel Absence

    This would work:

    =SUM(INDEX((Attendance!$A$1:$A$13=$A2)*(MATCH(Attendance!$C$1:$C$13,Attendance!$C$1:$C$13,0)=ROW(Attendance!$C$1:$C$13)),0))


    You can expand the range of rows, but don't try to apply to an entire column, just want you need.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    447

    Re: Using COUNTIFS to Determine Personnel Absence

    Hi JBeaucaire,

    I guess the formula is not doing a check for working days.

  4. #4
    Registered User
    Join Date
    01-02-2017
    Location
    Cambridge, England
    MS-Off Ver
    Office 2016 Mac
    Posts
    4

    Re: Using COUNTIFS to Determine Personnel Absence

    Quote Originally Posted by JBeaucaire View Post
    This would work:

    =SUM(INDEX((Attendance!$A$1:$A$13=$A2)*(MATCH(Attendance!$C$1:$C$13,Attendance!$C$1:$C$13,0)=ROW(Attendance!$C$1:$C$13)),0))


    You can expand the range of rows, but don't try to apply to an entire column, just want you need.
    Thank you JBeaucaire! This enables me to count the number of days worked which is a sufficient short-term fix for me. I think chullan88 may be correct that this doesn't count the number of working days but that doesn't matter as much as being able to count the total number of days.

    Apologies to ask for further help but I have tried to expand the formula to a new employee, Employee 3. However, when I expand the formula to reach the new row it shows as a 0. If you have any thoughts on this, I would be grateful. Thanks.
    Last edited by orientalist; 01-03-2017 at 04:05 PM.

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,184

    Re: Using COUNTIFS to Determine Personnel Absence

    Try this ...

    =SUM(--ISNUMBER(MATCH(WorkingDays!$A$2:$A$22,IF(A2=Attendance!$A$2:$A$14,Attendance!$C$2:$C$14),0)))

    Enter with Ctrl+Shift+Enter.

  6. #6
    Registered User
    Join Date
    01-02-2017
    Location
    Cambridge, England
    MS-Off Ver
    Office 2016 Mac
    Posts
    4

    Re: Using COUNTIFS to Determine Personnel Absence

    Quote Originally Posted by Phuocam View Post
    Try this ...

    =SUM(--ISNUMBER(MATCH(WorkingDays!$A$2:$A$22,IF(A2=Attendance!$A$2:$A$14,Attendance!$C$2:$C$14),0)))

    Enter with Ctrl+Shift+Enter.
    Hi Phuocam. Thank you. This seems to be working. I'm grateful to you, JBeaucaire and chullan88 for your valuable help.

  7. #7
    Registered User
    Join Date
    01-02-2017
    Location
    Cambridge, England
    MS-Off Ver
    Office 2016 Mac
    Posts
    4

    Re: Using COUNTIFS to Determine Personnel Absence

    [Deleted as duplicate post]
    Last edited by orientalist; 01-03-2017 at 07:08 AM. Reason: Deleted as duplicate post.

  8. #8
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    447

    Re: Using COUNTIFS to Determine Personnel Absence

    Quote Originally Posted by Phuocam View Post
    Try this ...

    =SUM(--ISNUMBER(MATCH(WorkingDays!$A$2:$A$22,IF(A2=Attendance!$A$2:$A$14,Attendance!$C$2:$C$14),0)))

    Enter with Ctrl+Shift+Enter.
    Hi Phoucam,
    That's a cool formula!
    Would you mind explaining it?

+ 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. Personnel Tracker
    By daldershot86 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-15-2016, 08:30 PM
  2. [SOLVED] Trying to Schedule Personnel
    By Plastik mac in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-22-2015, 02:30 AM
  3. Using a drop down list field to determine a criteria in Countifs function - need ALL
    By luciedefreitas in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-26-2014, 09:57 AM
  4. Ship's personnel spreadsheet
    By Anton1888 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-27-2013, 06:40 AM
  5. Replies: 0
    Last Post: 12-16-2011, 09:01 AM
  6. Looking for a template for personnel courses
    By C Holmes in forum Access Tables & Databases
    Replies: 3
    Last Post: 10-25-2010, 04:02 PM
  7. Personnel Costs - HELP
    By incognito in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-13-2006, 02:12 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