+ Reply to Thread
Results 1 to 4 of 4

Please help with a calculation

  1. #1
    Registered User
    Join Date
    10-27-2005
    Posts
    11

    Please help with a calculation

    I play a online game and want to monitor the age of players. I dont know if I need to use a Formula or Macro and don't even know which Functions I need! So maybe someone can help me?

    In the game a year has 112 days
    When a player joins your squad you know the date of arrival.
    For example, 27 december 2007
    His age is known (in years and days), a variable (between 15 and 19)
    For example, 17 years and 108 days
    I want to monitor his age at this moment!

    So when this player arrived 12 days ago (on 27 december 2007 and todays date is 8 januari 2008), at the age of 17 years and 108 days, he is now 18 years and 8 days old.

    Im using the formula:
    =TODAY()-Date1 //Date1 is date of arrival
    This results only in the number of days at the squad

    The problem is I can't find a solution to set a year to 112 days, even now I know how much this player is part of the squad.

    Any help would be great,
    KinSjama

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475
    Try this
    =TEXT(TODAY()-A1,"yy")&" yrs"&TEXT(TODAY()-A1," mm")&" Months"&TEXT(TODAY()-A1," dd")&" Days"
    Last edited by davesexcel; 05-15-2008 at 07:39 PM.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Assuming the following:

    A1 contains today's date

    A2 has the date the player arrived [27-Dec-2007 in your example], B2 has the age in years [17] and C2 the days [108]

    This formula will give the age at today's date given a year length of 112 days

    =B2+INT((C2-A2+$A$1)/112)&" years "&MOD(C2-A2+$A$1,112)&" days"

  4. #4
    Registered User
    Join Date
    10-27-2005
    Posts
    11
    Thanks both, I got it to work!!

+ 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