+ Reply to Thread
Results 1 to 4 of 4

Count / Avg Function

Hybrid View

  1. #1
    Registered User
    Join Date
    02-02-2005
    Posts
    51

    Count / Avg Function

    I am working on a Productivity Log and can't figure out a way to count unique values, and also average the time per assignment.

    Assignment with the action code A - should take 2 hrs to complete, all other action codes should take 20 minutes.

    I need to show how many of each action codes were done for the day, and what was the average time taken to complete each. Even better, how much for A action codes, and how much for all other.

    Please see the example attached.

    Thank you for your time
    Attached Files Attached Files
    Last edited by Alma; 07-28-2009 at 12:53 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Count / Avg Function

    Based on your sample file, my interpretation of your requirements, and assuming you're not running XL2007...

    G60: =SUMIF(F10:F59,"A",G10:G59)
    G61: =SUM(G10:G59)-G60

    G63: =G60/COUNTIF(F10:F59,"A")
    G289: =G61/SUM(COUNTIF(F10:F59,{"P","C","O"}))

    note: I'm not sure why G289 is not G64 (ie for Monday)

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Count / Avg Function

    In G60 using SUMIF(Range,Criteria,SumRange)
    =SUMIF(F10:F22,"A",G10:G22)
    In G61 assuming all other codes are either P,C or O
    =SUM(G10:G22)-G60
    In G63, using the previous SUMIF result in G60 and COUNTIF
    =G60/COUNTIF(F10:F22,"A")
    and in G64
    =G61/(COUNTIF(F10:F22,"P")+COUNTIF(F10:F22,"C")+COUNTIF(F10:F22,"O"))
    Is that what you are looking for?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    02-02-2005
    Posts
    51

    Re: Count / Avg Function

    Thank you so much. It works perfectly!

+ 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