+ Reply to Thread
Results 1 to 7 of 7

Trying (and failing) to calculate average time in hours by name by priority

  1. #1
    Registered User
    Join Date
    12-29-2020
    Location
    Manchester
    MS-Off Ver
    Microsoft 365 Apps for Enterprise
    Posts
    70

    Trying (and failing) to calculate average time in hours by name by priority

    Hi, I have been trying to sort this out for weeks and I'm hoping someone can help me. I think the root cause of some of it is simply that Excel doesn't like working out difference between dd/mm/yyyy hh:mm:ss formats so I have to use the 1904 setting (which causes further problems elsewhere) but what I need it to understand in my team how long (in hours) on average it is taking them to attend (or complete) tasks by priority. I've attached an example where I have manually typed in the correct values (yellow cells) the answers are a bit rubbish because there isn't much data where in the actual spreadie there are thousands of lines. I've tried doing it as a pivot but that doesn't like the 1904 business and seems to be throwing out all sorts of inaccurate numbers but in essence I need to know 'how many hours on average does it take Bill to attend a P1 job'

    If anyone can help I'd be beyond grateful. We're three months into the year and I still haven't managed to give my team any accurate performance data!

    Thanks

    Kt
    Attached Files Attached Files

  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: Trying (and failing) to calculate average time in hours by name by priority

    Is that a typo for John - P1 since there isn't any data for that combination?

    You mention 1904 settings implying you're using Excel for Mac. If so would you update your profile so that it's made clear. Personally I don't see why that would make a difference here.

    Do you have the AVERAGEIFS function?
    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
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,734

    Re: Trying (and failing) to calculate average time in hours by name by priority

    working on the spreadsheet at the same time Richard Buttrey posted
    I had the same ISSUE with the example , not matching the data
    ie John P1

    and used a AverageIFS , and do not get anything like the result
    I also reworked the Time taken using a formula , rather than a date

    see green block

    =AVERAGEIFS($D$2:$D$16,$F$2:$F$16,J$2,$G$2:$G$16,$I3)

    left the error in but can be easily fixed

    I'm on a mac and use the 1900 date NOT the 1904 as a 1 returns 1/1/1900

    Is that office version 2010 in profile
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    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: Trying (and failing) to calculate average time in hours by name by priority

    Hi,

    Try

    =IFERROR(AVERAGEIFS($E$2:$E$16,$G$2:$G$16,$I11,$F$2:$F$16,J$10)*24,"")

    In I11 copied across and down

  5. #5
    Registered User
    Join Date
    12-29-2020
    Location
    Manchester
    MS-Off Ver
    Microsoft 365 Apps for Enterprise
    Posts
    70

    Re: Trying (and failing) to calculate average time in hours by name by priority

    No I'm on a windows PC not a Mac. I had to use the 1904 thing to fix another formula in the spreadsheet where it wouldn't calculate negative times. For what is supposed to be a really simple thing to be able to do this spreadie seems to have become a world of pain!

  6. #6
    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: Trying (and failing) to calculate average time in hours by name by priority

    Excel doesn't like negative times. These normally arise when an end time in a set of data is earlier than a start time on a previous day. In that case you need to trap that situation and extend a time difference formula by adding 24.

    Have you tried the #4 suggestion?

  7. #7
    Registered User
    Join Date
    12-29-2020
    Location
    Manchester
    MS-Off Ver
    Microsoft 365 Apps for Enterprise
    Posts
    70

    Re: Trying (and failing) to calculate average time in hours by name by priority

    Yes #4 has worked thank you Richard. And the Excel guru from work has also been on and fixed it all as well.

    Thanks everyone!

    Kt

+ 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. [SOLVED] calculate average weekly hours
    By caelhonig in forum Excel General
    Replies: 13
    Last Post: 12-27-2015, 11:38 PM
  2. [SOLVED] Need to calculate average of hours worked
    By worthm in forum Excel General
    Replies: 2
    Last Post: 05-27-2015, 11:42 AM
  3. [SOLVED] [SOLVED] Calculate time worked inside Regular Hours and Over Time
    By myxamhatosis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-07-2015, 09:16 PM
  4. [SOLVED] Formula to Calculate Normal Hours, Time & 1/2 & Double Time from Daily Hours per week
    By KazzICC in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-17-2014, 01:51 AM
  5. [SOLVED] Calculate time for working hours when start time falls outside of working hours
    By SKDY_Beau in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-20-2014, 12:50 PM
  6. Calculate finish time given start time, working hours and job duration
    By swanseaexcel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-23-2012, 03:00 PM
  7. Subtracting hours from time to calculate overtime hours
    By nabilishes in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 10-16-2012, 08:56 AM

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