+ Reply to Thread
Results 1 to 5 of 5

How to grab certain data for calculation

  1. #1
    Registered User
    Join Date
    10-16-2023
    Location
    Salem, Oregon
    MS-Off Ver
    Excel for Mac v. 16.78
    Posts
    3

    Question How to grab certain data for calculation

    I have a table of 32 NFL teams (in rows) and columns for each week of the season. A formula takes a rating for each team from another Sheet for each game played and places it in this table, so columns will be filled from left to right as the season progresses. A "Season to Date Average" is easy to calculate using the =AVERAGE function in a fixed column to the right of all these weeks since it ignores blank columns (unplayed games) to calculate an average. But how would I put an Average Rating in another column to the right, which could be based on a number (which is up above, say, the heading of the column) which is the number of recent weeks to include in the average? For instance, at times I may want the average rating from only the most recent 3 weeks; other times the most recent 5 weeks. With the latest week of data being in a different column every week as we go through the season, I don't know how to build a formula which would capture the right set of weekly ratings to calculate an average rating. I haven't done any programming or VBA in Excel yet and just know the basic functions. Also after the average is calculated for a recent set of weeks, I will use the SORT function to reorder the rows (teams), highest to lowest, note the results, then analyze performance for another set of recent weeks. Thank you.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: How to grab certain data for calculation

    Depending on exactly what the spreadsheet looks like, an AVERAGEIFS() function seems appropriate. =AVERAGEIFS(ratings_for_team,weeknumbers,">="&startweek,weeknumbers,"<="&endweek) or equivalent.

    Considering what I have learned about good database design, it might be valuable in the long run to consider more of a "flat file" rather than the 2D table design you say you are starting with. In the long run, it might be easier to run summary stats on a good database.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    10-16-2023
    Location
    Salem, Oregon
    MS-Off Ver
    Excel for Mac v. 16.78
    Posts
    3

    Re: How to grab certain data for calculation

    Thank you!! That suggestion worked very well and I'm up and going.

  4. #4
    Registered User
    Join Date
    10-16-2023
    Location
    Salem, Oregon
    MS-Off Ver
    Excel for Mac v. 16.78
    Posts
    3

    Re: How to grab certain data for calculation

    Solved and all good

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,926

    Re: How to grab certain data for calculation

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

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    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. [SOLVED] Grab Name from Input Sheet, Enter To Modelling Sheet grab calcuations and report to Table
    By wherdzik in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-18-2023, 11:12 AM
  2. [SOLVED] Grab data according to ID
    By JACK JOUSH in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-26-2021, 05:32 PM
  3. Replies: 6
    Last Post: 09-07-2017, 09:48 AM
  4. [SOLVED] Grab data according to value
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-07-2014, 09:01 AM
  5. Excel 2007 : Grab Data in a Specific Day
    By OrangeBoy in forum Excel General
    Replies: 0
    Last Post: 10-10-2011, 05:14 AM
  6. grab data from one sheet and put it into another
    By ecrader in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2009, 07:22 PM
  7. Grab data from another workbook
    By enphynity in forum Excel General
    Replies: 6
    Last Post: 05-25-2007, 04:43 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