+ Reply to Thread
Results 1 to 11 of 11

Finding Average for Last 5/10 games closing line

  1. #1
    Registered User
    Join Date
    06-09-2021
    Location
    Toronto,canada
    MS-Off Ver
    16.72 (23040900) Microsoft Excel for Mac Licence 2019
    Posts
    57

    Finding Average for Last 5/10 games closing line

    Greetings everyone, was hoping for some help. I'm trying to find the formula to find the average closing line for a team in the last 5 games and 10 games. I've attached a workbook as an example.

    In column A8:A32 is the situation where the team was either a favourite or underdog, in column B8:B32 is the closing line. SO I would like to find the average closing line in column B8:B32 for last 5 and last 10 games. However, one catch, in both cell A33 and B33 I have #N/A, and that is there because each day I past from another workbook if the game they just played was either F/D and the closing line. So how can I avoid the average with the #N/A?

    Thanks and looking forward if anyone can help.
    Attached Files Attached Files

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,177

    Re: Finding Average for Last 5/10 games closing line

    i have played with a few formula

    =AVERAGE(IF(IF($A$8:$A$40=E41,ROW($A$8:$A$40)-1,"")<>"",IF(IF($A$8:$A$40=E41,ROW($A$8:$A$40)-1)>=LARGE(IF($A$8:$A$40=E41,ROW($A$8:$A$40)-1),F41),$B$8:$B$40,""),""))

    =AVERAGE(IF(ROW($A$8:$A$33)>=LARGE(IF($A$8:$A$33=E41,ROW($A$8:$A$33)),F41),IF($A$8:$A$33=E41,$B$8:$B$33)))
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2507
    Posts
    13,809

    Re: Finding Average for Last 5/10 games closing line

    showtimesaints please take time to update your profile. 16.49 is not an MS product number.

    Administrative Note:

    Is your forum profile showing the version of Excel that you need this to work for?

    Members will tailor the solutions they offer to the version of Office that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this.

    The three most recent versions of Excel are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the release number in your profile (e.g. MS365 Version 2211). This is in the About Excel section further down the Account page.

    Thanks.
    Dave

  4. #4
    Registered User
    Join Date
    06-09-2021
    Location
    Toronto,canada
    MS-Off Ver
    16.72 (23040900) Microsoft Excel for Mac Licence 2019
    Posts
    57

    Re: Finding Average for Last 5/10 games closing line

    It worked!!! Apologies for the tardiness in getting back to you. Worked like a charm, thank you!

  5. #5
    Registered User
    Join Date
    06-09-2021
    Location
    Toronto,canada
    MS-Off Ver
    16.72 (23040900) Microsoft Excel for Mac Licence 2019
    Posts
    57

    Re: Finding Average for Last 5/10 games closing line

    Quote Originally Posted by etaf View Post
    i have played with a few formula

    =AVERAGE(IF(IF($A$8:$A$40=E41,ROW($A$8:$A$40)-1,"")<>"",IF(IF($A$8:$A$40=E41,ROW($A$8:$A$40)-1)>=LARGE(IF($A$8:$A$40=E41,ROW($A$8:$A$40)-1),F41),$B$8:$B$40,""),""))

    =AVERAGE(IF(ROW($A$8:$A$33)>=LARGE(IF($A$8:$A$33=E41,ROW($A$8:$A$33)),F41),IF($A$8:$A$33=E41,$B$8:$B$33)))

    It worked!!! Apologies for the tardiness in getting back to you. Worked like a charm, thank you!

  6. #6
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Finding Average for Last 5/10 games closing line

    I don't know what MS-Off Ver: 16.49 means, but if you have updated to MS-off 365 (version 2203 or newer) you can also try this formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,177

    Re: Finding Average for Last 5/10 games closing line

    you are welcome
    if you are on version 365 subscription
    then HansDouwe would be a better solution

  8. #8
    Registered User
    Join Date
    06-09-2021
    Location
    Toronto,canada
    MS-Off Ver
    16.72 (23040900) Microsoft Excel for Mac Licence 2019
    Posts
    57

    Re: Finding Average for Last 5/10 games closing line

    Quote Originally Posted by FlameRetired View Post
    showtimesaints please take time to update your profile. 16.49 is not an MS product number.

    Administrative Note:

    Is your forum profile showing the version of Excel that you need this to work for?

    Members will tailor the solutions they offer to the version of Office that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this.

    The three most recent versions of Excel are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the release number in your profile (e.g. MS365 Version 2211). This is in the About Excel section further down the Account page.

    Thanks.

    Sorry for the lateness in getting back. I updated my profile, I did as you recommended and the version I have is 16.67. It's Microsoft Excel for Mac. Hope this helps and sorry about the confusion.

  9. #9
    Registered User
    Join Date
    06-09-2021
    Location
    Toronto,canada
    MS-Off Ver
    16.72 (23040900) Microsoft Excel for Mac Licence 2019
    Posts
    57

    Re: Finding Average for Last 5/10 games closing line

    Quote Originally Posted by HansDouwe View Post
    I don't know what MS-Off Ver: 16.49 means, but if you have updated to MS-off 365 (version 2203 or newer) you can also try this formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    I have version 16.67. I'm trying this formula to, but am getting #NAME?. Am trying CTL+Shift+return but no luck.

  10. #10
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,177

    Re: Finding Average for Last 5/10 games closing line

    thats a 365 subscription

    should see that in the about , info on the mac

    also the version number in brackets -
    have you updated recently

    you should not have to use control - shift - enter as 365 version automatically applies arrays

    seems to work for me
    Attached Images Attached Images

  11. #11
    Registered User
    Join Date
    06-09-2021
    Location
    Toronto,canada
    MS-Off Ver
    16.72 (23040900) Microsoft Excel for Mac Licence 2019
    Posts
    57

    Re: Finding Average for Last 5/10 games closing line

    Quote Originally Posted by etaf View Post
    thats a 365 subscription

    should see that in the about , info on the mac

    also the version number in brackets -
    have you updated recently

    you should not have to use control - shift - enter as 365 version automatically applies arrays

    seems to work for me
    Ah, thanks! K I updated my profile with your help, thank you!

+ 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. [SOLVED] How to calculate average score of games
    By colemic in forum Excel General
    Replies: 5
    Last Post: 11-09-2022, 03:05 AM
  2. Replies: 3
    Last Post: 11-09-2021, 05:24 PM
  3. finding duplicate numbers line by line
    By srqkud in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 02-04-2020, 08:08 AM
  4. [SOLVED] Baseball Results: H/G when Games<30 & AB/G when Games<10
    By Eric Alan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-16-2017, 02:29 AM
  5. Replies: 5
    Last Post: 12-31-2016, 09:12 PM
  6. Replies: 4
    Last Post: 03-31-2016, 11:43 PM
  7. Straight Average Line on Line Chart
    By miked79 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-11-2008, 12:00 PM

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