+ Reply to Thread
Results 1 to 5 of 5

Count hour/minutes that meet conditions and within an date/time interval

  1. #1
    Registered User
    Join Date
    02-22-2013
    Location
    Boxtel
    MS-Off Ver
    Excel 2010
    Posts
    27

    Count hour/minutes that meet conditions and within an date/time interval

    Hello,

    I hope someone can help me with this.

    The goal is to calculate the fee an employee gets based on registered start date/time and end date/time. With two conditions:

    the time a person worked between 0:00 and 18:00 earns him €1
    The time a person worked between 18:00 and 0:00 earns him €5

    I am registering the start date and time and end date and time.
    startdate and time 22-02-2013 at 16:00
    Enddate and time 23-02-2013 at 02:00

    So from 16:00 till 18:00 he wil earn 2 times €1
    And from 18:00 till 02:00 he wil earn 8 times €5
    Total earnings are €42


    Is there a formula i can use, or perhaps develop one using VBA?

    Thank you in advance for your time!

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Count hour/minutes that meet conditions and within an date/time interval

    Hi,
    Is there only ever a maximum of 24 hours difference between the start and end date/times?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    02-22-2013
    Location
    Boxtel
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Count hour/minutes that meet conditions and within an date/time interval

    I Think so, but what if it isnt?

  4. #4
    Registered User
    Join Date
    02-22-2013
    Location
    Boxtel
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Count hour/minutes that meet conditions and within an date/time interval

    Could anybody tell me if my problem can be solved??
    Last edited by DirkBekkers; 02-25-2013 at 10:34 AM.

  5. #5
    Registered User
    Join Date
    02-22-2013
    Location
    Boxtel
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Count hour/minutes that meet conditions and within an date/time interval

    Help please!

+ 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