+ Reply to Thread
Results 1 to 10 of 10

Average formula giving wrong results

  1. #1
    Forum Contributor
    Join Date
    09-13-2016
    Location
    Kenya
    MS-Off Ver
    Excel 2010
    Posts
    321

    Average formula giving wrong results

    I was going through some formulas to ensure that all calculations are correct when I realized that the formula for the last 5 matches is giving wrong results. I had the formulas correct in a sample workbook. I do not seem to be seeing anything wrong but I know one of the forum experts will be able to spot the error.

    Template.xlsx

    Note: The goals should be divided by number of matches played.
    OnditiGK

  2. #2
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Average formula giving wrong results

    Hi Onditi- Which cells exactly are giving you trouble? AO6:AQ25?

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,879

    Re: Average formula giving wrong results

    I am not going to give the answer directly: look at the formulae then look at data column in column C.

    Hint: filter on AWAY column for Manchester City.
    Last edited by JohnTopley; 05-07-2017 at 06:56 AM.

  4. #4
    Forum Contributor
    Join Date
    09-13-2016
    Location
    Kenya
    MS-Off Ver
    Excel 2010
    Posts
    321

    Re: Average formula giving wrong results

    The date column is not filled to the last match. Thank you John for making me realize this.

  5. #5
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Average formula giving wrong results

    The formulae in AO6:AQ25 operate on the last five dates in column C. Some dates are missing - Row 297 down. Fix that, you should be good. - Lee

  6. #6
    Forum Contributor
    Join Date
    08-04-2004
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    186

    Re: Average formula giving wrong results

    check dates in col c and see how far they go down

  7. #7
    Forum Contributor
    Join Date
    09-13-2016
    Location
    Kenya
    MS-Off Ver
    Excel 2010
    Posts
    321

    Re: Average formula giving wrong results

    How can these formulae be used with IFERROR?

    =IF($CF6="","",(SUMIFS(E:E,D:D,$CF6)+SUMIFS(F:F,G:G,$CF6))/(COUNTIF(D:D,$CF6)+COUNTIF(G:G,$CF6)))

    =IF(CF48="","",SUMPRODUCT(($E$6:$E$5000)*($C$6:$C$5000>=LARGE(--($D$6:$D$5000=$CF48)*($C$6:$C$5000),Sheet2!$F$5))*($D$6:$D$5000=$CF48))/$CG48)

    =IF(CF48="","",(SUMPRODUCT(($E$6:$E$5000)*($C$6:$C$5000>=LARGE(--(($D$6:$D$5000=$CF48)+($G$6:$G$5000=$CF48))*($C$6:$C$5000),Sheet2!$F$5))*(($D$6:$D$5000=$CF48)))+SUMPRODUCT(($F$6:$F$5000)*($C$6:$C$5000>=LARGE(--(($D$6:$D$5000=$CF48)+($G$6:$G$5000=$CF48))*($C$6:$C$5000),Sheet2!$F$5))*(($G$6:$G$5000=$CF48))))/$CI48)

    Note: The aim is to avoid the #DIV/0! error.
    Last edited by gko_87; 05-07-2017 at 09:23 AM.

  8. #8
    Forum Contributor
    Join Date
    08-04-2004
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    186

    Re: Average formula giving wrong results

    =IFERROR(your function, what you want if there is an error)
    ie
    IFERROR(IF($CF6="","",(SUMIFS(E:E,D:D,$CF6)+SUMIFS(F:F,G:G,$CF6))/(COUNTIF(D:D,$CF6)+COUNTIF(G:G,$CF6))),"")

  9. #9
    Forum Contributor
    Join Date
    09-13-2016
    Location
    Kenya
    MS-Off Ver
    Excel 2010
    Posts
    321

    Re: Average formula giving wrong results

    Thanks you.That solved it.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,998

    Re: Average formula giving wrong results

    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!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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. Pivot table giving wrong results?
    By domgilberto in forum Excel General
    Replies: 1
    Last Post: 10-22-2014, 11:08 AM
  2. [SOLVED] VLOOKUP giving wrong results
    By boddulus in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 08-30-2014, 10:16 AM
  3. [SOLVED] Vlookup giving Wrong Results
    By timbo1957 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 11-15-2013, 08:18 AM
  4. COUNTIF giving wrong results
    By Excel_vba in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-29-2013, 04:17 PM
  5. Quotation marks in formula giving wrong output
    By pcfreakshow in forum Excel General
    Replies: 1
    Last Post: 10-11-2012, 03:00 PM
  6. formula giving wrong result sometimes?
    By lnjr in forum Excel General
    Replies: 2
    Last Post: 08-13-2010, 09:20 AM
  7. Very large complex workbook is now giving me the wrong results :(
    By S Davis in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-17-2006, 04:05 PM

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