+ Reply to Thread
Results 1 to 4 of 4

findinf a matching name ans adding up the last 5 entries

  1. #1
    Registered User
    Join Date
    03-12-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    18

    findinf a matching name ans adding up the last 5 entries

    Hi
    I'm trying to add the last 5 weeks goal difference of the team named in cell d2 on the odds sheet with the goal difference information for the same team on gldiff sheet.

    Not every team plays each week so if a team does not play then DNP will appear in the cell. Some teams might play 5 times in a 6 week period or more so it needs to be able to tell that.
    It does not make a difference if the team is playing home or away.

    I've manually put two answers in columns:

    Cell D2 on odds sheet: Accrington = 7 in cell F2 this figure in obtained by adding together the figures on sheet gldiff cell H2:B2 which is a seven week period but only played 5 times.
    Cell E2 on odds sheet: Birmingham = 0 in cell G2 this figure in obtained by adding together the figures on sheet gldiff cell H8:C8 which is a six week period but only played 5 times.

    The sheet gldiff will have new figures added in each week. The new week will always be the last data added to the sheet.

    I don't know if it will be of any help but the game week will always be in column A on the odds sheet and row 1 on the gldiff sheet if you need to use it as a starting point for adding up the previous weeks.

    I hope someone can help.
    Attached Files Attached Files

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699

    Re: findinf a matching name ans adding up the last 5 entries

    One way is to use this formula in F2

    =SUMIF(gldiff!$B$1:$Z$1,">="&IFERROR(LARGE(IF(ISNUMBER(INDEX(gldiff!$B$2:$Z$100,MATCH(D2,gldiff!$A$2:$A$100,0),0)),gldiff!$B$1:$Z$1),5),1),INDEX(gldiff!$B$2:$Z$100,MATCH(D2,gldiff!$A$2:$A$100,0),0))

    confirmed with CTRL+SHIFT+ENTER then copied do G2 and down both columns. If there aren't 5 numbers for that team then all numbers will be summed
    Audere est facere

  3. #3
    Registered User
    Join Date
    03-12-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: findinf a matching name ans adding up the last 5 entries

    Hi
    Thanks for the speedy reply, I'm afraid it doesn't seem to work it just puts ## and doubles the row size of the cell i've put the formula in. When I press Ctrl+Shift+Enter the formula seems to flick as it is doing somthing then nothing happens. Any ideas.

    Cheers

  4. #4
    Registered User
    Join Date
    03-12-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: findinf a matching name ans adding up the last 5 entries

    Hi daddylonglegs.

    I have the forula giving me an answer now thak you, It's not the answer I'm looking for but the information on the gldiff sheet is wrong so ineed to sort that out first and I'll be back intouch if that doesn't sort out the problem. I sorted out the # problem.
    Thank you for your time so far.

    Regards
    andyh42.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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