+ Reply to Thread
Results 1 to 15 of 15

Calculating total minutes worked in real time, minus breaks and lunch.

  1. #1
    Registered User
    Join Date
    05-16-2013
    Location
    Dallas TX
    MS-Off Ver
    Excel 2010
    Posts
    14

    Calculating total minutes worked in real time, minus breaks and lunch.

    I work for a sales call center and we currently have a dashboard that shows number of calls and minutes on the phone. I'm looking to use time and an IF function to find the number of minutes worked in real time so I can calculate time between phone calls. MY IF statement doesn't seem to work. =IF(E5>TIME(11,0,0),(E5-G5)-TIME(1,15,0),IF(E5>TIME(10,0,0),(E5-G5)-TIME(0,15,0))) it works for only one of the IF's

    What I'm looking for: I want excel to subtract 15 minutes if its past 9:00 AM, subtract 75 minutes (1 hour, 15 minutes) if its past 11:00 AM, and subtract 90 minutes (1 hour, 30 minutes) if its past 3:00 PM. Then it needs to subtract the minutes between the start of the day and adjusted time. i.e. current time is 3:15, (3:15 PM - 1 hour, 30 Minutes) = 1:45 PM. Then I need to read 1:45 PM - 7:30 AM = 375 minutes.

    I have attached a sample. Any help would be GREAT!

    Thanks in advance.
    Attached Files Attached Files
    Last edited by uacdub; 08-04-2014 at 02:35 PM.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Calculating total minutes worked in real time, minus breaks and lunch.

    You're problem may be that the values in E are the result of the NOW() funciton.
    The NOW funciton includes the DATE as well as the time.
    So E5 will always be greater than TIME(11,0,0) because it's including today's date.

    Try changing all the references to E5 to MOD(E5,1)

    Or better yet, change the formula in E to
    =MOD(NOW(),1)

  3. #3
    Registered User
    Join Date
    05-16-2013
    Location
    Dallas TX
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Calculating total minutes worked in real time, minus breaks and lunch.

    Thanks Jonmo1!

    It's now working, well almost. How do I convert it from hh:mm to just minutes. I have attached the updated file but it currently just shows hours and minutes (5:56) I need it to read 356 for total minutes.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-16-2013
    Location
    Dallas TX
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Calculating total minutes worked in real time, minus breaks and lunch.

    Never mind I think I figured it out. Made it a general number then =E3*1440.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Calculating total minutes worked in real time, minus breaks and lunch.

    You're welcome.

  6. #6
    Registered User
    Join Date
    05-16-2013
    Location
    Dallas TX
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Calculating total minutes worked in real time, minus breaks and lunch.

    Thanks again for your help. I have attached a sample file using what you showed me to get my results. If you can think of an easier way to do this please let me know but this defiantly seems to be working.
    Attached Files Attached Files

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Calculating total minutes worked in real time, minus breaks and lunch.

    I don't see where you implimented my suggestion?

  8. #8
    Registered User
    Join Date
    05-16-2013
    Location
    Dallas TX
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Calculating total minutes worked in real time, minus breaks and lunch.

    Ooops. Uploaded the wrong file.
    Attached Files Attached Files

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Calculating total minutes worked in real time, minus breaks and lunch.

    Before getting into this (I'm leaving for the day anyway)..

    Are you SURE that formula is giving you the results you want?
    I don't understand the relationship between the current time and the average time between calls that have already occurred?
    If you look at the document at say 3PM, it will have different results than it did when you looked at it at 8AM.

    I don't get it.

    And what about times Less than 2AM?
    Time between Midnight and 2AM are not accounted for.


    Best advice to begin with is to get rid of the whole current time column.
    And have just a single cell, say M1 or whatever contain the =MOD(NOW(),1)
    Then make the formulas in E refer to $M$1 instead of F2

    NOW is a volatile funciton, and repeating it over and over creates alot of unnecessary work for Excel.

  10. #10
    Registered User
    Join Date
    05-16-2013
    Location
    Dallas TX
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Calculating total minutes worked in real time, minus breaks and lunch.

    Jonmo you were right. I checked it this morning and it does not work.

    To help you understand what I'm looking for. Where I work everyone starts work at 7:30 AM. We have 15 minute breaks at 9:00 AM & 2:00 PM. We also have a 1 hour lunch at 11:00 AM.

    Since we are an outbound sales call center we currently have a dashboard that tracks number of calls and minutes spent on the phone and updates constantly. I'm looking to find out the average amount of time each rep spends in between making phone calls in real time. The only way to do so you have to know exactly how many minutes have currently been worked. The formula is = (Total Minutes @ Work - Minutes Spent on the Phone)/# of Calls. Since I need the most up to the date minutes worked I need a way to subtract those minutes as breaks and lunch occur.

    I'm not sure if I need to approach this from a different angle but I would like to just drop data into excel throughout the day and have a function that works based on current time.

  11. #11
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Calculating total minutes worked in real time, minus breaks and lunch.

    You can't base this on the "current time"
    What you need is a cell that indicates the time that the report was generated.

    Does EVERYONE take their breaks/lunches at exactly the same time?
    That doesnt' make sense for a Call Center (I've worked at call centers too)..
    So I don't think you can subtract 15 minutes simply because the report was generated after 9 AM.

    You need to know what time each individual actually took their breaks/lunch

  12. #12
    Registered User
    Join Date
    05-16-2013
    Location
    Dallas TX
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Calculating total minutes worked in real time, minus breaks and lunch.

    Everyone takes lunch and break at the same time in our largest and main office in Dallas. We do have an office in Utah that takes lunch at a different time but I am not worried about them.

    So as I mentioned earlier there are 3 trigger times. 9:00, 11:00, & 2:00.

  13. #13
    Registered User
    Join Date
    05-16-2013
    Location
    Dallas TX
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Calculating total minutes worked in real time, minus breaks and lunch.

    accidental re-post.

  14. #14
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Calculating total minutes worked in real time, minus breaks and lunch.

    OK, so 2 basic problems then.

    You can't refer to the "Current Time" using the NOW() function as stated before, the results will be different depending on what time of day you look at the report.
    You need to make a cell that represents a 'static' time that the report was generated, say $M$1 for example.
    And all the references in your formula should refer to $M$1 instead of the column F where you had the Now function.

    2. Nested IF's are read from Left to Right.
    The first one to be true is executed, the rest ignored.
    So you need to test for the specific times in an appropriate order.
    Your current formula is testing for >2AM then >11AM then >10AM
    If the value is say 3PM, then the first IF (>2AM) is True, when it seems you actually intended for it to read the >11AM

    So the order of the tests should go Largest to Smallest / Left to Right
    >11AM then >10AM then >2AM

    Hope that helps.

  15. #15
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Calculating total minutes worked in real time, minus breaks and lunch.

    Have you tried to use the UDF from post #9 in http://www.excelforum.com/excel-form...-included.html ?
    Best Regards,

    Kaper

+ 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. Replies: 6
    Last Post: 07-05-2022, 01:06 PM
  2. Replies: 10
    Last Post: 03-31-2014, 01:18 PM
  3. How can I get my formula to deduct lunch breaks based on hours worked?
    By nikijune in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-28-2013, 05:10 PM
  4. minus 30 minutes for lunch
    By jonnyc in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-08-2007, 03:38 PM
  5. Calculating Total Time Worked on a
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-23-2005, 12:29 PM

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