+ Reply to Thread
Results 1 to 26 of 26

Calculate average age of football players.

  1. #1
    Registered User
    Join Date
    08-19-2013
    Location
    Skive, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    6

    Calculate average age of football players.

    Hello folks.

    So I'm not exactly an Excel Shark, but I now a little here and there. I'm danish and use a danish version of excel. But if you can help me with my problem you can just write your solution in English, and I'm sure that I can manage to figure it out in the danish version as well.

    I want to create a formula that can calculate football players exact age in years, months and days. And after that calculate the average age of the whole player squad after that.

    I have the birth date of all the 23 players listed from C2-C24 and today's date in D2-D24. And if possible I'd like the players exact age in years, months and days in E2-E24 with the possibility to see their average age below in E25.

    Also so, that I can just edit today's date in the D2-D24 when ever I desire, and then see the new average age maybe a couple of months later?

    Can anyone help me with this? Would really help me a lot!

    Thank you.

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Calculate average age of football players.

    Hi,

    In E2 and copy down:

    =DATEDIF(C2,D2,"y")&" years "&DATEDIF(C2,D2,"ym")&" months "&DATEDIF(C2,D2,"md")&" days"

    Good luck with the translation!

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    09-29-2011
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Calculate average age of football players.

    In Cell D2 input the formula: =Today()
    in Cell E2 input: D2-C2
    Change the format of the cells in the E column to Custom and select/type YY/MM/DD
    Copy down the formulas in D2:E2
    Insert the average formula: =average(E2:E24) in cell E25 (make sure it has the same formatting as in the E2:E24)

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Calculate average age of football players.

    @siggyfloyd

    Are you sure of your logic?

    How old today is a player born on 19/07/1988? Or one born on 05/07/1984?

    Regards

  5. #5
    Forum Contributor
    Join Date
    07-02-2013
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    197

    Re: Calculate average age of football players.

    This is a solution without todays date in column D.
    Attached Files Attached Files

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Calculate average age of football players.

    A person can have an exact age expressed in years, months, and days, but:

    1. You can't use that to compare the age of two players

    2. You can't average those values in any meaningful way.
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Calculate average age of football players.

    "A person can have an exact age expressed in years, months, and days, but:

    1. You can't use that to compare the age of two players

    2. You can't average those values in any meaningful way.
    "

    True, but there's nothing stopping you calculating the average age in days, then returning that average in the form "years, months, and days".

    Regards

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Calculate average age of football players.

    ...or do what Rambo4711 does in his attachment. he uses the same DATEDIF formula but uses the average of the DOBs as first date. That would be my prefered method
    Audere est facere

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Calculate average age of football players.

    there's nothing stopping you calculating the average age in days, then returning that average in the form "years, months, and days".
    Yes, but only meaningfully if they were all born on the same day, which seems unlikely.

  10. #10
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Calculate average age of football players.

    Why "not meaningful" shg? Agreed there's no definitive "correct answer" when it comes to the exact number of days/months but surely the concept of "average age" is OK? Or are you saying that it would be better expressed differently?

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Calculate average age of football players.

    If the average age of players is 32 days (they start younger and younger), what's their average age in months and days? It depends on the date you start.

  12. #12
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Calculate average age of football players.

    I think we're looking at in two different ways.

    Of course, rigorously, shg is correct, in that there's no way to arrive at a strictly 'correct' answer to the question of finding an 'average age' for several people.

    But then, how often do we employ the term 'average' in a way which, though perhaps strictly unsound, nevertheless has 'meaning'? "It rains on average nine months of the year in Seattle" would be unlikely to get published in Nature, but, by other standards, it's still a statistic that, nevertheless, has 'meaning'.

    Regards

  13. #13
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Calculate average age of football players.

    "If the average age of players is 32 days (they start younger and younger), what's their average age in months and days? It depends on the date you start."

    Even then, you could use a statistical approximation to the average number of days in a month to give a reasonable answer.

    Depending on over what timescale you take that average, I don't see why, with an average of e.g. 1 month = 30.1 days, you couldn't use that to give "0 years, 1 month and 2 days" in this example.

    Regards

  14. #14
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Calculate average age of football players.

    Sure, except that no month has 30.4 days. Decimal years would seem to me to be less inexact.

  15. #15
    Registered User
    Join Date
    08-19-2013
    Location
    Skive, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Calculate average age of football players.

    Quote Originally Posted by XOR LX View Post
    Hi,

    In E2 and copy down:

    =DATEDIF(C2,D2,"y")&" years "&DATEDIF(C2,D2,"ym")&" months "&DATEDIF(C2,D2,"md")&" days"

    Good luck with the translation!

    Regards
    Translation went fine and it works as I hoped.... Now I just need some easy solution to find the average age of the results of E2-E24? Can you or someone else by any chance help me with that?

  16. #16
    Forum Contributor
    Join Date
    07-02-2013
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    197

    Re: Calculate average age of football players.

    See attached test of how the average age could be confirmed.
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    08-19-2013
    Location
    Skive, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Calculate average age of football players.

    Thanks dude! Your formula to calculate the average helped me a lot...

    It seems as I now have what I need if the different formulas don't mess up leap year calculation

  18. #18
    Registered User
    Join Date
    08-19-2013
    Location
    Skive, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Calculate average age of football players.

    Quote Originally Posted by Rambo4711 View Post
    This is a solution without todays date in column D.
    Thanks dude! Your formula to calculate the average helped me a lot...

    It seems as I now have what I need if the different formulas don't mess up leap year calculations

  19. #19
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Calculate average age of football players.

    Seems like you could just use

    =TODAY() - AVERAGE(A2:A24)

    and format as yy" years "m" months "d" days"
    Last edited by shg; 08-20-2013 at 01:15 PM.

  20. #20
    Registered User
    Join Date
    08-19-2013
    Location
    Skive, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Calculate average age of football players.

    Sorry. Either I do it wrong, or it doesn't work

  21. #21
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Calculate average age of football players.

    What doesn't work?

  22. #22
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Calculate average age of football players.

    Quote Originally Posted by shg View Post
    ....and format as yy" years "m" months "d" days"
    The months are always a problem in that format, always one too high (never shows zero but does show 12) because "m" is month of the year. And if you use 1904 date format the days and years will also be out!

    I don't think there's a simple way to show durations in Y/M/D format - you either have to use DATEDIF or revert to some other measurement like fractional years or days.

  23. #23
    Registered User
    Join Date
    08-19-2013
    Location
    Skive, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Calculate average age of football players.

    Never mind. It works now... Now I just hope it's 100% accurate, and there's no leap year mistakes or some other mistake about it's calculations about month's with 30, 31 or 28 days.

  24. #24
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Calculate average age of football players.

    Quote Originally Posted by daddylonglegs View Post
    The months are always a problem in that format, always one too high (never shows zero but does show 12) because "m" is month of the year.
    Good catch, DO, thanks. How about

    =EDATE(TODAY() - AVERAGE(C2:C24), -1) + 1

    ... formatted as before.

    And if you use 1904 date format the days and years will also be out,
    That would change all of the hard-coded dates, but I take your point.
    Last edited by shg; 08-20-2013 at 07:31 PM.

  25. #25
    Registered User
    Join Date
    12-05-2014
    Location
    Stockton on Tees, UK
    MS-Off Ver
    2010
    Posts
    1

    Re: Calculate average age of football players.

    Hi guys,
    just new to the forum and I realise this is an old thread but it really helped me calculate the average ages of two teams in a match on a given date.
    I've attached my spreadsheet (incidentally for the Division One game between Bolton and Man United on 7/10/1963. Hope it helps someone.
    Attached Files Attached Files

  26. #26
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,598

    Re: Calculate average age of football players.

    bladerider,
    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Ben Van Johnson

+ 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. Calculate the score for a football championship
    By Nuno Fale in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-20-2012, 07:14 AM
  2. Replies: 3
    Last Post: 09-18-2012, 09:50 AM
  3. [SOLVED] Football stats - calling football fans!
    By Steve_123 in forum Excel General
    Replies: 5
    Last Post: 05-18-2012, 09:15 AM
  4. Need a formula to auto calculate wins for a football pool
    By My3QTPies in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-11-2011, 01:14 PM
  5. Formula required to calculate points for football results prediction
    By Jen1979 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-15-2009, 11:46 AM

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