+ Reply to Thread
Results 1 to 4 of 4

Calculating shift totals and breaks past midnight

  1. #1
    Registered User
    Join Date
    06-13-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    8

    Calculating shift totals and breaks past midnight

    Hi Guys

    I have a spreadsheet broken down into 15 minute intervals where I calculate wages to a particular area. (staff can start and finish anywhere on the quarter hour)
    If the employee works more than 5 hours then an unpaid break is given at the 4 hour mark of the shift for 30 minutes so no wages should be allocated during that time.
    The total of all the 15 minute intervals should add up to the total paid to that employee on the day.
    Once i have a shift go past midnight no data appears in any of the 15 minute intervals.
    I am currently using the following formula to determine if the wage should be allocated to the 15 minute slot

    =IF(AND(CL$1>=$X165,CL$1<=$Y165),IF(AND(CL$1>=$Z165,CL$1<=$AA165),0,$J165),0)

    but like I said there are variances and for some employees it works and for others it doesn't and I cant figure out why!!
    Attached Files Attached Files

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Calculating shift totals and breaks past midnight

    Okay, I started by changing your formulas in Columns X,Y & Z to these: (or ..you could eliminate these 3 columns, as the data is stored in the reference columns, but this may requirw changes to other sheets as well, so I just went this way...)
    (X2) =G2
    (Y2) =H2
    (Z2) =I2
    (You already have the columns formatted as TIME, so no need to change that)
    Now the question is--- do you really need the 15 minute interval cost of wages...OR, do you want the cost of that employee? (if you want the cost/15 mins, your formulas need extensive revision, if cost the employee cost per shift, not too bad )
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Registered User
    Join Date
    06-13-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Calculating shift totals and breaks past midnight

    thank for your help. I ended up changing the time to a number and writing an if statement =if(X2>Y2,Y2=1,Y2) in column Z. Then any times after midnight calculated properly. I then used pivot tables to sum all the data on the hour for each day.

  4. #4
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Calculating shift totals and breaks past midnight

    Gkad you found a solution...
    Date and time are a Number, A lot of what you qare trying can be simplified if you treat them as such...years/months/days (days in actuality) are above 1, fractions of days (Hours/Minutes/Seconds) are the 'decimal' part of the number- what comes after the decimal point
    If your solution works for you -

    Please remember to mark the thread as solved if you are satisfied with your solution :
    To mark thread "Solved", go to the top of the thread,click "Thread Tools",click "Mark as Solved"

+ 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