+ Reply to Thread
Results 1 to 5 of 5

Need Help With Average Formula

  1. #1
    Registered User
    Join Date
    08-01-2019
    Location
    Utah
    MS-Off Ver
    2016
    Posts
    3

    Need Help With Average Formula

    Hello,

    I have a spreadsheet with two rows, top row are dates and the second row are sale pieces. I have the Average If function set up for the second row to give me the average ignoring blank cells. My goal is to get the minimum value required to get to 14.5 with X amount of days left in a month if my average is not 14.5.

    Please see the attached example. No data yet for Aug 5th and 6th, current average is 11.875. Since average is not 14.5, is it possible for Excel to figure out the minimum value for the remainder of the range to reach 14.5?

    average.png

    I have been stuck on this for a while. Any help is appreciated.

    Thank you.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Excel 2016
    Posts
    9,580

    Re: Need Help With Average Formula

    Hello & Welcome to the Forum,

    Are you looking for maybe >> =(14.5-H4)/(COUNTA(A1:F1)-COUNTIF(A2:F2,">0"))

    Aug 5th and Aug 6th would have to total 1.3125 to get to the total of 14.5
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    08-01-2019
    Location
    Utah
    MS-Off Ver
    2016
    Posts
    3

    Re: Need Help With Average Formula

    I've tried the formula you provided and it is giving me the result you stated. However, my goal result here is to get 19.8 as the return value for H5. By putting in 19.8 for Aug 5th and Aug 6th, the value in H4 will barely be 14.5166667. I want to know the minimum value for blank cells (future days on a calendar) to hit 14.5 as the average by the end of the month. I hope I'm explaining this clearly.

  4. #4
    Registered User
    Join Date
    08-01-2019
    Location
    Utah
    MS-Off Ver
    2016
    Posts
    3

    Re: Need Help With Average Formula

    I think I found the solution! =(14.5*(COUNTBLANK(A2:F2)+COUNTA(A2:F2))-SUM(A2:F2))/COUNTBLANK(A2:F2)

    Thanks for kick starting my brain.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2019 (Win 10 - Work) & 365 Subscription Insider (Win 10 - Home)
    Posts
    34,077

    Re: Need Help With Average Formula

    Well done and thanks for sharing. Sometimes a shove is all you need.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

+ 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