+ Reply to Thread
Results 1 to 9 of 9

Count attandance within a month by employee ID

  1. #1
    Registered User
    Join Date
    12-22-2020
    Location
    Bangladesh
    MS-Off Ver
    2016
    Posts
    4

    Post Count attandance within a month by employee ID

    I was working on an attendance sheet.
    A B C D E F G H
    Staff ID: PB01 PB02 PB03 PB04 PB05 PB06 V001
    Kabir Monir Alamgir Yeamin Akash sadek Mahfuz
    01 October 2021 P P P P P P P
    02 October 2021 P P P P P P P
    03 October 2021 P P P P P P P
    04 October 2021 P P P P P P P
    05 October 2021 P W P P P P W
    06 October 2021 W P W W W W P
    07 October 2021 P P P P P P P
    08 October 2021 P P P P P P P

    And so on............
    Now I want to count the total attendance "P" of a month by using Staff ID, something like as below

    Staff ID: PB01 (Dropdown staffs ID)
    Name:

    Attandance
    JAN #N/A
    FEB #N/A
    MAR #N/A
    APR #N/A
    MAY #N/A
    JUN #N/A
    JUL #N/A
    AUG #N/A
    SEP #N/A
    OCT 1
    NOV #N/A
    DEC #N/A

    Here I use this formula =COUNTIFS(INDEX($B$4:$BA$1000,MATCH(1,($A$4:$A$1000>=AX6)*($A$4:$A$1000<=AX7),0),MATCH(BA2,$B$2:$BA$2,0)),"P")
    In AX6: start date of a month
    In AX7: Last date of that month
    but it returns 1. not the total attendance date. Please seeking solution for this problem from experts.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,717

    Re: Count attandance within a month by employee ID

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file. From your sample data shown, it is difficult to discern formatting and spacing.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    12-22-2020
    Location
    Bangladesh
    MS-Off Ver
    2016
    Posts
    4

    Re: Count attandance within a month by employee ID

    Here I attach my sample datasheet.
    Attached Files Attached Files

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: Count attandance within a month by employee ID

    d5=COUNTIFS(Sheet1!$A$3:$A$63,">="&$A5,Sheet1!$A$3:$A$63,"<="&$B5,INDEX(Sheet1!$B$3:$P$63,,MATCH($D$2,Sheet1!$B$1:$P$1,0)),"P")
    e5=COUNTIFS(Sheet1!$A$3:$A$63,">="&$A5,Sheet1!$A$3:$A$63,"<="&$B5,INDEX(Sheet1!$B$3:$P$63,,MATCH($D$2,Sheet1!$B$1:$P$1,0)),"W")
    f5=COUNTIFS(Sheet1!$A$3:$A$63,">="&$A5,Sheet1!$A$3:$A$63,"<="&$B5,INDEX(Sheet1!$B$3:$P$63,,MATCH($D$2,Sheet1!$B$1:$P$1,0)),"L")
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,992

    Re: Count attandance within a month by employee ID

    To use a single formula change the file as per attachment



    Sheet2


    D6=SUMPRODUCT((Sheet1!$B$1:$P$1=Sheet2!$D$2)*(MONTH(Sheet1!$A$3:$A$100)=MONTH(Sheet2!$C6&0))*(Sheet1!$A$3:$A$100<>"")*(Sheet1!$B$3:$P$100=Sheet2!D$4))

    Copy down
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-22-2020
    Location
    Bangladesh
    MS-Off Ver
    2016
    Posts
    4

    Re: Count attandance within a month by employee ID

    Thanks Samba, it worked nicely.

  7. #7
    Registered User
    Join Date
    12-22-2020
    Location
    Bangladesh
    MS-Off Ver
    2016
    Posts
    4

    Re: Count attandance within a month by employee ID

    Thanks CARACALLA, Its worked nicely.

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,717

    Re: Count attandance within a month by employee ID

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  9. #9
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,411

    Re: Count attandance within a month by employee ID

    Elastic version - No on sheet formula to maintain - code on WorkSheet_Change event - fired by the change in data validation box.
    Attached Files Attached Files
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

+ 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. Coding in an employee count month by month and per region/department
    By bowlerjp in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-14-2019, 07:13 PM
  2. Tally by month and employee
    By munizmoonkat in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-07-2018, 01:23 PM
  3. Replies: 2
    Last Post: 08-16-2017, 02:11 AM
  4. Employee count by month
    By rpetty in forum Excel General
    Replies: 1
    Last Post: 04-13-2017, 06:55 PM
  5. Compare the Daily Attandance sheet as per the full employee list
    By ankit2987 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2014, 06:39 AM
  6. [SOLVED] Print attandance certificates from a given name list
    By wayneg in forum Excel General
    Replies: 5
    Last Post: 05-30-2013, 04:09 AM
  7. [SOLVED] Excel 2003- Benefit attandance calendar
    By shelian1 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-16-2006, 12:25 PM

Tags for this Thread

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