+ Reply to Thread
Results 1 to 7 of 7

Formula for grouping the average of daily values by Julian Week

  1. #1
    Registered User
    Join Date
    06-06-2011
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2003
    Posts
    14

    Formula for grouping the average of daily values by Julian Week

    I am looking for a formula when given a daily results will average the results grouping into Julian Week. (Basically 5 days of data averaged, but by week). The formula also needs to excude when values of "0" are reported.

    Where:
    Column A = Date
    Column B = Julian Week Number
    Column C= Daily Percentage
    Column D= To equal average of daily results within a Julian Week that excludes "0" values.

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

    Re: Formula for grouping the average of daily values by Julian Week

    Try this
    =SUMPRODUCT(--($B$2:$B$500 = J1),--($C$2:$C$500 >0), ($C$2:$C$500))/SUMPRODUCT(--($B$2:$B$500 = J1),--($C$2:$C$500 >0))
    Where J1 is the cell containing your week # to average. Does that work for you?
    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

  3. #3
    Registered User
    Join Date
    06-06-2011
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Formula for grouping the average of daily values by Julian Week

    This did not give me the desired outcome.

    I have attached a test file to review.

    I need to group the incidents on a single day that are tracked for each person. Then, I need the average of those incidents on that single day. Then, I need the average of the daily incidents on a weekly basis, excluding "0", and working on a rolling basis to cover the entire year.

    When I used your formula, excel "Help" made a few adjustments:
    =SUMPRODUCT(--$C$2:$C$236)*($D$2:$D$236>0)*($D$2:$D$236)/SUMPRODUCT(--($C$2:$C$236),--($D$2:$D$236>0))

    Resulting in an average of 114.
    Attached Files Attached Files

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

    Re: Formula for grouping the average of daily values by Julian Week

    Have you ever tried pivot tables? See attachment. Is that what you are looking for?
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-06-2011
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Formula for grouping the average of daily values by Julian Week

    This is EXACTLY what I was looking for!

    Thank you!

  6. #6
    Registered User
    Join Date
    06-06-2011
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Formula for grouping the average of daily values by Julian Week

    Is there a way to exclude values of "0" when averaging daily and weekly?

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

    Re: Formula for grouping the average of daily values by Julian Week

    Hmm, the only thing I can tell you is to remove the zeros from your original list. Do a Search and Replace making sure that the option of "Match Entire Cell Contents" is checked. Find 0 Replace with nothing > Replace all. Then Refresh your pivot tables (Pivot tables do not refresh themselves)

+ 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