+ Reply to Thread
Results 1 to 15 of 15

Calculating day difference for football team played from last game (rest day)

  1. #1
    Registered User
    Join Date
    11-04-2022
    Location
    Johor, Malaysia
    MS-Off Ver
    365
    Posts
    7

    Question Calculating day difference for football team played from last game (rest day)

    Hello there!

    I'm new to here and I'm very grateful if anyone can help me with my post.

    So, here is my question. I have a spreadsheet on Austrian Football Bundesliga consist of several column such as date, name of team, stats and etc.

    What I would like to do is to create two columns for my table to have a day difference (rest day) of each team's from previous game before play next game, so it would show the number of days as gap between date of previous game that they have played until next game as rest day for both home and away team before they play for the next game. I have searched all around the web but haven't found anything that can help me. I know some basic formula to calculate days difference but I can't do that for all matches accordingly to the specific teams.

    Please see attached for your reference. If anyone could help that would be great.
    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: Calculating day difference for football team played from last game (rest day)

    crossposted: https://forum.ozgrid.com/forum/index...game-rest-day/

    Rule 03: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future

    However, if you continue to crosspost, you can expect to have your thread BLOCKED until you update it yourself.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    11-04-2022
    Location
    Johor, Malaysia
    MS-Off Ver
    365
    Posts
    7

    Re: Calculating day difference for football team played from last game (rest day)

    Dear alansidman,

    I'm so sorry for my carelessness and breaking the rules. Thank you for reminding me and gave me another chance. I'm already delete my other post.

    Thank you.

  4. #4
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,039

    Re: Calculating day difference for football team played from last game (rest day)

    Try this, H2=IFERROR(XLOOKUP(B2,B3:B$3062,$A3:$A$3062)-$A2,""), copy down and across.

  5. #5
    Registered User
    Join Date
    11-04-2022
    Location
    Johor, Malaysia
    MS-Off Ver
    365
    Posts
    7

    Re: Calculating day difference for football team played from last game (rest day)

    Quote Originally Posted by josephteh View Post
    Try this, H2=IFERROR(XLOOKUP(B2,B3:B$3062,$A3:$A$3062)-$A2,""), copy down and across.
    Hi josephteh,

    Thank you for your help and I really appreciate it. I already try it but it only cover Home Team only. It should cover both date for home and away team. The initial value for 1st match should start with 0 because there is no date for previous match. Here, I attach a image for your reference. Thank you again. Attachment 803782

  6. #6
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,039

    Re: Calculating day difference for football team played from last game (rest day)

    Your attachment is not valid.

  7. #7
    Registered User
    Join Date
    11-04-2022
    Location
    Johor, Malaysia
    MS-Off Ver
    365
    Posts
    7

    Re: Calculating day difference for football team played from last game (rest day)

    Quote Originally Posted by josephteh View Post
    Your attachment is not valid.
    Sorry, I reupload back my attachment.
    Attached Images Attached Images

  8. #8
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,039

    Re: Calculating day difference for football team played from last game (rest day)

    Try this, =LET(x,MAX(XLOOKUP(B2,$B$1:$B1,$A$1:$A1,0,0,-1),XLOOKUP(B2,$C$1:$C1,$A$1:$A1,0,0,-1)),IF(x=0,0,$A2-x))

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

    Re: Calculating day difference for football team played from last game (rest day)

    Or try this formula in H2 and copy across and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    FC Innsbruck played also 12/7/2000 so this formula returns 7 in H17 instead of 15.
    Attached Files Attached Files
    Last edited by HansDouwe; 11-06-2022 at 09:58 AM.

  10. #10
    Registered User
    Join Date
    11-04-2022
    Location
    Johor, Malaysia
    MS-Off Ver
    365
    Posts
    7

    Re: Calculating day difference for football team played from last game (rest day)

    Quote Originally Posted by josephteh View Post
    Try this, =LET(x,MAX(XLOOKUP(B2,$B$1:$B1,$A$1:$A1,0,0,-1),XLOOKUP(B2,$C$1:$C1,$A$1:$A1,0,0,-1)),IF(x=0,0,$A2-x))
    Sorry again since I miss to highlight 12/7/2000 but its work perfectly. Thank you so much.

  11. #11
    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,413

    Re: Calculating day difference for football team played from last game (rest day)

    Quote Originally Posted by Naz92 View Post
    Dear alansidman,

    I'm so sorry for my carelessness and breaking the rules. Thank you for reminding me and gave me another chance. I'm already delete my other post.

    Thank you.
    Why? There was no need to do that.

    Cross posting is allowed as long as you declare it (in both places) with a link. You probably need to re-read the rules on both forums!!!
    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.

  12. #12
    Registered User
    Join Date
    11-04-2022
    Location
    Johor, Malaysia
    MS-Off Ver
    365
    Posts
    7

    Re: Calculating day difference for football team played from last game (rest day)

    Quote Originally Posted by HansDouwe View Post
    Or try this formula in H2 and copy across and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    FC Innsbruck played also 12/7/2000 so this formula returns 7 in H17 instead of 15.
    Thank you to point out the date that I miss to highlight. Its works perfectly too. I really appreciate and thanks to both of you. I will break down this formulas to learn and understand it.

  13. #13
    Registered User
    Join Date
    11-04-2022
    Location
    Johor, Malaysia
    MS-Off Ver
    365
    Posts
    7

    Re: Calculating day difference for football team played from last game (rest day)

    Actually I quiet panic during that time. So, I delete the post without hesitation. After that I realize that cross posting is allowed as long as I declare it in both forums. I already mark this thread as SOLVED. Thank you AliGW for reminder

  14. #14
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,039

    Re: Calculating day difference for football team played from last game (rest day)

    Hans' formula is much better and shorter as well!

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

    Re: Calculating day difference for football team played from last game (rest day)

    You are welcome, glad to help., thanks for the feedback and rep .

+ 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] Looking to auto generate players per round in a game being played.
    By peejaygee in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-27-2020, 03:05 PM
  2. Counting How Many Players Played a Game with Percentages
    By saulgodman in forum Excel General
    Replies: 9
    Last Post: 07-27-2018, 11:51 AM
  3. How to design a simple guessing game, played by one player against the computer.
    By Papsco in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-06-2015, 10:40 PM
  4. How can i find team name from above and see if they have played in last 24h
    By Ipinho100 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-08-2013, 04:56 PM
  5. Replies: 2
    Last Post: 12-06-2012, 06:02 PM
  6. Replies: 3
    Last Post: 06-10-2008, 07:53 AM
  7. Game score without game being played
    By Sheila in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 05-17-2005, 07:06 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