+ Reply to Thread
Results 1 to 6 of 6

Average hours worked based on days worked during a pay cycle

  1. #1
    Registered User
    Join Date
    09-04-2012
    Location
    Texas
    MS-Off Ver
    Excel 2016, 2019
    Posts
    53

    Average hours worked based on days worked during a pay cycle

    I want to average the hours worked based on the number of days worked that week. In my example, the average reflects the 7 days of the week. I would like to create a formula that does not count those days the have 0.00 in the "hours worked" field. I am working with Excel 2007 and on the face it seems really simple but I am firmly in the land of "I can't see the damn trees cause this forest is in the way"

    Please help!


    Average hours.xlsx
    Last edited by jaycee66; 10-14-2012 at 07:22 PM. Reason: [Solved]

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Average hours worked based on days worked during a pay cycle

    try this...
    =AVERAGEIF(E16:R16,"<>"&0)

    let me know if that moved the forest for you?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor dogberry's Avatar
    Join Date
    07-15-2012
    Location
    Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    624

    Re: Average hours worked based on days worked during a pay cycle

    Its moved the forest for me but could you explain what the & does I can figure everything else out

    Thanks

    Chris
    Click my star if I helped Thanks

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Average hours worked based on days worked during a pay cycle

    sometimes =AVERAGEIF(E16:R16,"<>0") will give you an error, so by combining (concatenating) the "<>" with 0 gives you "<>"&0 - not equal to 0

    in this case, you could also have used =AVERAGEIF(E16:R16,"<>0"), i just make it a habit to use the &

  5. #5
    Registered User
    Join Date
    09-04-2012
    Location
    Texas
    MS-Off Ver
    Excel 2016, 2019
    Posts
    53

    Re: Average hours worked based on days worked during a pay cycle

    FDibbins many, many Thanks!
    How can other ranges be added, if I wanted to add another row (E33:R33) to do the same thing with your formula.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Average hours worked based on days worked during a pay cycle

    if that is a unique range (E33:R33) then you can just copy that formula down.

    =AVERAGEIF(E33:R33,"<>0") you could also change the "<>0" to any other value you want

  7. #7
    Forum Contributor dogberry's Avatar
    Join Date
    07-15-2012
    Location
    Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    624

    Re: Average hours worked based on days worked during a pay cycle

    Quote Originally Posted by FDibbins View Post
    sometimes =AVERAGEIF(E16:R16,"<>0") will give you an error, so by combining (concatenating) the "<>" with 0 gives you "<>"&0 - not equal to 0

    in this case, you could also have used =AVERAGEIF(E16:R16,"<>0"), i just make it a habit to use the &
    Many thanks, I think I will get into that habit as well.

    Chris

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Average hours worked based on days worked during a pay cycle

    If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neet and tidy lol, and thanks for the rep

+ 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.6.0 RC 1