+ Reply to Thread
Results 1 to 7 of 7

how to calculate days worked for an average over a five week period

  1. #1
    Registered User
    Join Date
    02-21-2014
    Location
    Dunstable, England
    MS-Off Ver
    Excel 2010
    Posts
    30

    how to calculate days worked for an average over a five week period

    Could someone please tell me how to calculate days worked. So basically you can see from the attached spreadsheet that over a 5 week period I record start times and finish times. On the Overall section I have a box stating how many hours have been wored in toal but want to divide that by the days worked, as obviously I don't want it divided by say 31 days, I want the actual days worked. Thanks in advanceMega master.xlsx

  2. #2
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: how to calculate days worked for an average over a five week period

    Hi, maybe (in E5):
    =IFERROR(D5/(COUNTIF(Week1!C10:I10,">"&0)+COUNTIF(Week2!C10:I10,">"&0)+COUNTIF(Week3!C10:I10,">"&0)+COUNTIF(Week4!C10:I10,">"&0)+COUNTIF(Week5!C10:I10,">"&0)),0)

  3. #3
    Registered User
    Join Date
    02-21-2014
    Location
    Dunstable, England
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: how to calculate days worked for an average over a five week period

    Thanks for the reply. Could I also use that formula in all the parts requiring averages in the Overall section of the spread sheet? and if so would this formula still work on the sections that are filled in with a "Y" (in the nights out sections)
    Last edited by Nicky_B; 02-24-2014 at 08:52 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: how to calculate days worked for an average over a five week period

    Hi shouldn't be a problem. For counting nights out, change to COUNTIF(Week1!C11:I11,"Y")+COUNTIF(Week2!C11:I11,"Y") etc.

  5. #5
    Registered User
    Join Date
    02-21-2014
    Location
    Dunstable, England
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: how to calculate days worked for an average over a five week period

    Thank you so much for that. Can I be cheeky and ask another question? On some occasions drivers may drive different vehicles. so for example on Week 1 if a driver drives truck A, then the following day drives truck B, on the Trucks Overall page, I need results for each truck, how do I get it to know that the driver had driven a different truck, and to make sure the correct information goes into the correct column in the Truck Overall page? Sorry for this, as you can tell I'm not very good at this Mega master.xlsx Attached is the updated file

  6. #6
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: how to calculate days worked for an average over a five week period

    =SUMIF(Week1!C7:I7,'Trucks Overall'!A5,Week1!C14:I14)
    the above formula will give you the sum of kilometres for one person for vehicle ID from A5. (ID must of course also be in row 7 in week1)

    If you want to sum kilometres for all persons for week1 (for one truck), just add the rows for the rest;:

    =SUMIF(Week1!C7:I7,'Trucks Overall'!A5,Week1!C14:I14) +SUMIF(Week1!C26:I26,'Trucks Overall'!A5,Week1!C33:I33) etc

    If you want to sum all weeks for one person (for one truck):
    =SUMIF(Week1!C7:I7,'Trucks Overall'!A5,Week1!C14:I14)+ =SUMIF(Week2!C7:I7,'Trucks Overall'!A5,Week1!C14:I14) etc.

    edited:
    =SUMIF(Week1!C7:I7,'Trucks Overall'!A5,Week1!C14:I14)+SUMIF(Week2!C7:I7,'Trucks Overall'!A5,Week1!C14:I14) etc.
    Last edited by estige; 02-24-2014 at 10:37 AM.

  7. #7
    Registered User
    Join Date
    02-21-2014
    Location
    Dunstable, England
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: how to calculate days worked for an average over a five week period

    Wow, that one has gone right over my head. Could you place them in the spread sheet that was attached to show me what you mean instead?

+ 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. Calculate Worked hours per week from a client dropdown list
    By Garibaldi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-21-2013, 04:30 AM
  2. [SOLVED] Average hours worked based on days worked during a pay cycle
    By jaycee66 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-14-2012, 06:27 PM
  3. Sum Over A Period of Time With Different Values For Different Days of the Week
    By ljustman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-08-2012, 12:58 PM
  4. Calculate Work Days Based on Hours Worked
    By FM1 in forum Excel General
    Replies: 7
    Last Post: 02-04-2009, 12:27 PM
  5. Formula to calculate Period & Week into Date?
    By AstroPenguin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-17-2008, 08:12 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