+ Reply to Thread
Results 1 to 10 of 10

Excel calculations on dates

  1. #1
    Registered User
    Join Date
    03-01-2024
    Location
    usa
    MS-Off Ver
    365
    Posts
    9

    Excel calculations on dates

    Hi everyone,

    I came across a little bit of an issue. I have attendance sheet that keep track of people punching in on time, missing days etc. Problem I am having with it is that points should resent a year after they got assigned. As an example if someone was late on March 1st 2023, next to their name in the column I'd put letter "M" that'd give them 0.33 points. On March 1st 2024 those points should not be counted anymore. Also, there can be more than 1 instance per day, in case someone does not punch in on time more than once - I'd put then "M M" which would add up to 0.66 points.

    I've attached a sample below.

    Thank you.

    example.xlsx

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Excel calculations on dates

    There were no absences in the last year... so I added a few for the first name.

    Try:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    03-01-2024
    Location
    usa
    MS-Off Ver
    365
    Posts
    9

    Re: Excel calculations on dates

    Thank you Glenn! Quick question, what if I'd like to add more than just 1 letter to this whole process and assign different numerical values to it? Would I be able to do it using that formula?

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Excel calculations on dates

    Everything is possible. But you have not defined what you mean by

    "add more than just 1 letter to this whole process and assign different numerical values to it"

    You need to be SPECIFIC and DETAILED. That's just too vague.

  5. #5
    Registered User
    Join Date
    03-01-2024
    Location
    usa
    MS-Off Ver
    365
    Posts
    9

    Re: Excel calculations on dates

    You are right, I do apologize for that... Here are the values that I currently use.

    M -> .33
    L -> .33
    E -> .33
    A -> 1
    T -> 1
    N -> 1
    PTO -> 0 (I'm adding it here since in the past I had an issue with PTO adding 1 point because of the letter T in it)

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Excel calculations on dates

    And do some/all/ none of these have the possibility of double entries in a cell?

    And do you want an OVERALL total... or one foreach type one value for M, one for L, etc, etc.

    The devil's in the detail...

  7. #7
    Registered User
    Join Date
    03-01-2024
    Location
    usa
    MS-Off Ver
    365
    Posts
    9

    Re: Excel calculations on dates

    All of these can be inputted multiple times into a cell, it can also happen that 1 cell will have different letters. As an example if cell has letters "A M" the total for that day is 1.33 points. I want to get an overall total for the year from those letters.

    Thank you again

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,565

    Re: Excel calculations on dates

    Perhaps this will help.
    Add six columns (B:G) which may be hidden for aesthetic purposes.
    In row 3 place the penalty points for each infraction.
    In row 4 place the infraction symbol.
    Populate rows 5 and down using: =COUNTIFS($I5:$NK5,"*"&B$4&"*",$I$4:$NK$4,">="&EDATE(TODAY(),-12))
    Note that for infraction T the formula is:
    =COUNTIFS($I5:$NK5,"*"&F$4&"*",$I$4:$NK$4,">="&EDATE(TODAY(),-12),$I$4:$NK$4,"<="&TODAY())-COUNTIFS($I5:$NK5,"pto",$I$4:$NK$4,">="&EDATE(TODAY(),-12),$I$4:$NK$4,"<="&TODAY())
    The points column is populated using: =SUMPRODUCT(B5:G5,B$3:G$3)
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  9. #9
    Registered User
    Join Date
    03-01-2024
    Location
    usa
    MS-Off Ver
    365
    Posts
    9

    Re: Excel calculations on dates

    Wow... This is it! Simple solution to my complicated problem - mainly because I cannot explain it. Thank you!!!!!!!

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,565

    Re: Excel calculations on dates

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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. Dates Calculations
    By tushararora in forum Excel General
    Replies: 3
    Last Post: 09-05-2017, 06:16 AM
  2. Automatic calculations and maunal calculations Excel 2013
    By JCtheRULEr in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-12-2017, 05:09 AM
  3. [SOLVED] Creating Calculations on Dates
    By Kate67 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-05-2012, 04:47 PM
  4. Calculations involving dates...
    By Finalfrontier1976 in forum Excel General
    Replies: 2
    Last Post: 07-13-2011, 07:40 AM
  5. Dates and Calculations
    By mhoctober in forum Excel General
    Replies: 2
    Last Post: 02-20-2011, 04:05 PM
  6. Calculations with Dates/Times
    By soma104 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-20-2010, 02:05 PM
  7. auto-calculations using calendar and dates (Excel-Office 2000)
    By Sally from Chatham in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-18-2005, 10: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