+ Reply to Thread
Results 1 to 4 of 4

How to determine if a day is within a defined period

  1. #1
    Registered User
    Join Date
    04-15-2010
    Location
    Lancashire, England
    MS-Off Ver
    Office 2007 SP3
    Posts
    21

    How to determine if a day is within a defined period

    Hi All,

    I have a particular challenge that I am really struggling with. I am putting together an employee attendance spreadsheet and I need to apply different conditions to absence days depending on how many absences the employee has taken in a given period.

    The rule is that on their first day of absence a 56 day period starts. The first three days of this period are unpaid waiting days and then subsequent days within 56 days from the first day are paid in full. The next absence after the 56th day triggers the start of a new 56 day period. I can figure out the way to tackle the absence days within the first 56 day period but I am struggling to determine if it is a waiting or paid day within the next 56 day period. I think I need a little routine that runs each time I change the "Absence Reason" cell and return a value to a cell on the same row but the next column so that I can do calculations with regards their salary.

    I have attached a sample sheet that I hope will help.

    Thank you in advance for any help.

    Eric...
    Attached Files Attached Files
    Last edited by EricofPendom; 03-06-2012 at 09:22 AM. Reason: solved

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: How to determine if a day is within a defined period

    Hi

    See how this goes. I've put a result in column O to determine the pay type for the time being to test things.

    Please Login or Register  to view this content.
    rylo

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

    Re: How to determine if a day is within a defined period

    Your sample sheet is missing critical info... your desired results. The actual final output.
    _________________
    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!)

  4. #4
    Registered User
    Join Date
    04-15-2010
    Location
    Lancashire, England
    MS-Off Ver
    Office 2007 SP3
    Posts
    21

    Re: How to determine if a day is within a defined period

    Hi Rylo,
    You are a lifesaver, your code works great. I get very confused with nested if's and I often look for a less elegant way of doing things or give up. I was close to giving up!! Thank you very much for your time and expertise.
    Eric...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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