+ Reply to Thread
Results 1 to 3 of 3

Providing how many times staff members have been late by staff ID

  1. #1
    Registered User
    Join Date
    12-15-2013
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    8

    Providing how many times staff members have been late by staff ID

    OK

    So i have a huge dataset showing staff clocking in and out times.

    Column A: Staff ID
    Column B: IN Time
    Column C: Out Time
    Column D: Lateness Time


    Ok so bearing in mind this data set has 1000's of staff ID's and only some of the rows contain a lateness time (which is shown as a negative number, -10 means they were 10 minutes late).

    I need a way of generating a table/list that is going to automatically count/say that this staff ID from column A appears to have a negative number in Column D this many times.

    Obviously not every staff member has had lateness, so it would not be feasable to have EVERY staff member listed, only those who have a negative number in a column D.





    Hope this is clear - and that someone can help!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Providing how many times staff members have been late by staff ID

    Use column E as a helper, with a formula like this in E2:

    =IF(D2<0,MAX(E$1:E1)+1,"-")

    then copy down to the bottom of your data (the hyphens help to show you this). The formula will produce a unique sequential number for those records where there is a lateness value entered. Then in column G you can list the members of staff who have been late with this formula in G2:

    =IFERROR(INDEX(A:A,MATCH(ROWS($1:1),E:E,0)),"")

    and you can copy this down until you start to get blanks. In H2 you can have this formula:

    =IF(G2="","",COUNTIFS(A:A,G2,D:D,"<0"))

    and copy this down to give you a count of the number of times each person is late.

    Hope this helps.

    Pete

  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: Providing how many times staff members have been late by staff ID

    Anothetr option, if you have a list of EE names (if not, you can create 1), then next to each name, just use a simple =countif(A:A,"<0) copied 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

+ 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. Staff Planner - How To Set Up UserForm to Generate Data into Staff & Date Spreadsheet
    By Marie Snell in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-19-2013, 11:04 PM
  2. Replies: 9
    Last Post: 02-08-2012, 01:03 PM
  3. log staff's flexi times
    By AllanWilliams in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-16-2007, 10:46 AM
  4. Replies: 3
    Last Post: 10-27-2005, 11:05 AM
  5. [SOLVED] annual leave planner for approx 100 staff members
    By wally in forum Excel General
    Replies: 1
    Last Post: 03-22-2005, 08:06 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