+ Reply to Thread
Results 1 to 8 of 8

Using HLOOKUP to determine the range to AVERAGEIFS

  1. #1
    Registered User
    Join Date
    04-25-2013
    Location
    perth, australia
    MS-Off Ver
    Excel 2011
    Posts
    22

    Using HLOOKUP to determine the range to AVERAGEIFS

    Hi guys,

    Having a crack at forecasting sports results. I've attached a simplified version of the spreadsheet I am working with. Basically I would like to have a column of data showing the 'form' of the home team. I define form to be: the average margin from the past month's games.

    Column A - date
    Column B - home team
    Column C - away
    Column D - margin
    Column E - team a's result (blank if a doesn't play)
    Column F - team b's result
    Column G - team c's result
    Column H - team d's result
    Column I - home team form

    I would like column have the form of the home team. I was thinking of using AVERAGEIFS to take an average of the home teams results and use EDATE-1, to ensure if only averages the last month, but I have to specify a specific column to average. This is a problem because the home team changes every game and I would need to average a different column (i.e. column F if team b is the home team). I was thinking of using HLOOKUP for this, but I couldn't get it to work. Any ideas?
    form.xlsx

  2. #2
    Valued Forum Contributor wenqq3's Avatar
    Join Date
    04-01-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    868

    Re: Using HLOOKUP to determine the range to AVERAGEIFS

    Hmm..I try to understand your question.
    Do you mean Average of each Home Team for each month?
    -If the problem is solved, please mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved".

    -Always upload a workbook before start your question
    To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

    +++ If my answer(s) helped you, please add me reputation by click on * +++

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Using HLOOKUP to determine the range to AVERAGEIFS

    The years of the date's are in 2009 and as per your logic we need to pick the data based on last month comparison. Whether date comparison should not include years? (Since we are in 2013 now)


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Registered User
    Join Date
    04-25-2013
    Location
    perth, australia
    MS-Off Ver
    Excel 2011
    Posts
    22

    Re: Using HLOOKUP to determine the range to AVERAGEIFS

    Yes, in my full spreadsheet, there are games up until this year, not just 2013.

    And in response to the earlier question, the values in column I should be the home team for that row's average result in the last month.
    E.g. in row 16, d is the home team. In the month prior to this game, d only played once, 12 may, which is row 14. so the value in cell I16 would be -25

  5. #5
    Valued Forum Contributor wenqq3's Avatar
    Join Date
    04-01-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    868

    Re: Using HLOOKUP to determine the range to AVERAGEIFS

    at Row 16,
    Date is 24-May-09, therefore "In the month prior to this game" should be April right?
    And in April "D" score total 38+9+5 = 52, and average is 52/3 = 17.33333.
    Did my understanding wrong?

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Using HLOOKUP to determine the range to AVERAGEIFS

    May be this...

    In I2 Cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Drag it down...

    Refer the attached excel for details
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-25-2013
    Location
    perth, australia
    MS-Off Ver
    Excel 2011
    Posts
    22

    Re: Using HLOOKUP to determine the range to AVERAGEIFS

    wenqq3, when I say last month, I mean in the last 30-31 days. I.e. if they played on 24th may, the last month would be 24 april-23 may.

  8. #8
    Valued Forum Contributor wenqq3's Avatar
    Join Date
    04-01-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    868

    Re: Using HLOOKUP to determine the range to AVERAGEIFS

    Try this, at I8 put
    Please Login or Register  to view this content.
    then expand it.

+ 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