+ Reply to Thread
Results 1 to 4 of 4

Thread: Separating time-intervals

  1. #1
    Registered User
    Join Date
    11-27-2011
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2003
    Posts
    1

    Separating time-intervals

    Hi there. I have a question, I hope some of you can help me with.

    I want to create an excel-sheet to calculate a salary.

    I would like 3 columns:

    A: Meeting time
    B: Got off
    C: Salary

    The tricky thing is that there is a different payment for different time-intervals.

    From 06.00 to 08.00: 100
    From 09:00 to 17:00: 150
    From 18:00 to 24:00: 200

    So lets say I type:___ A (Meeting time)___B (Got off)__Salary____Example number
    __________________07:00___________18:00______?________1____________
    __________________23:00___________09:00______?________ 2___________

    How do I make a formula that can figure out what the total salary is? Because in example 1, you have 1 hour to 100/hour, 7 hours to 150/hour and 1 hour to 200/hour.
    In example 2, you also have to deal with to fact that it can create some difficulties when you go from 23:00 to 09.00

    Really hope some of you can give me a hint to solve this problem.

    Thanks!
    Last edited by himedimarn; 11-27-2011 at 02:05 PM.

  2. #2
    Forum Guru mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2007/2010
    Posts
    3,004

    Re: Help with seperating time-intervals

    Not sure I fully nderstand the salary bit but I hope the this helps.

    To get the time, add this to C2

    =IF(B2-A2>0,B2-A2,B2+1-A2)
    
    or 
    
    =IF(B2-A2>0,B2-A2,B2+1-A2) * 24
    Assuming that there are salary bands which relate to the length of the shift, in D2 add

    =IF(C2<=1,C2*24*100,IF(C2<=7,C2*24*150,C2*24*200))
    
    or 
    
    =IF(C2<=1,C2*100,IF(C2<=7,C2*150,C2*200))
    Martin

    Eighty Twenty Spreadsheet Automation http://homepage.ntlworld.com/martin.rice1/ for all your Excel customisation and consulting needs.

    If my solution has saved you time and/or money, please consider donating to Cancer Research UK.

  3. #3
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Re: Separating time-intervals

    I would set up your "look up table" differently if I were you.

  4. #4
    Valued Forum Contributor
    Join Date
    07-20-2011
    Location
    mysore
    MS-Off Ver
    Excel 2003
    Posts
    421

    Re: Separating time-intervals

    What about time inervals between
    08:00 to 09:00
    17:00 to 18:00
    00:00 to 07:00

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0