+ Reply to Thread
Results 1 to 13 of 13

Thread: Birthday dates

  1. #1
    Registered User
    Join Date
    07-12-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2003
    Posts
    7

    Birthday dates

    Hello,

    I have a list of full birthday dates in separate rows. Like:

    1985.07.05
    1988.01.08
    ...

    I'd like to achieve two things. First, I'd like to sort dates so I'd see nearest b-days, like:

    1 - 1988.01.08 (its first, because January 8 goes before July 5)
    2 - 1985.07.05
    ...

    And second, I'd like to see a year count, thats going to be on next b-day.

    Could you please give any references on how to write correct formulas for these goals?

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,204

    Re: Birthday dates

    You can extract dates and add Age.

    Then add filter in first row and sort by Date column.
    Attached Files Attached Files
    "Relax. What is mind? No matter. What is matter? Never mind!"

  3. #3
    Registered User
    Join Date
    07-12-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Birthday dates

    Thank you zbor! Thats what I was looking for.

  4. #4
    Registered User
    Join Date
    07-12-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Birthday dates

    It seems sorting doesnt work very well with dates, that are on the same months.
    6.23 (June 23) shows as being first compared to 6.6 (June 6).

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,204

    Re: Birthday dates

    Try this in B2 then sort:

    =A2-DATE(YEAR(A2),0,0)
    "Relax. What is mind? No matter. What is matter? Never mind!"

  6. #6
    Registered User
    Join Date
    07-12-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Birthday dates

    It suggest there is error in formula. As I remember, one cannot directly add or subtract dates. Maybe thats the cause.

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,204

    Re: Birthday dates

    Try use ; instead of , as a delimiter
    "Relax. What is mind? No matter. What is matter? Never mind!"

  8. #8
    Registered User
    Join Date
    07-12-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Birthday dates

    Formula =A2-DATE(YEAR(A2);0;0) is accepted, but result is rather strange. If A2 is 1988.01.08, then this returns 1900.02.08

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,204

    Re: Birthday dates

    Format it as number.
    You will get integers.

    From 1 to 366. Number of days after New Year (including NY).
    "Relax. What is mind? No matter. What is matter? Never mind!"

  10. #10
    Registered User
    Join Date
    07-12-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Birthday dates

    Yes, but why did 01.08 (January) changed to 02.08 (February)?

  11. #11
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,204

    Re: Birthday dates

    Doesn't matter, but you can use:

    =A9-DATE(YEAR(A9);1;0)

    To fix it.
    "Relax. What is mind? No matter. What is matter? Never mind!"

  12. #12
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,204

    Re: Birthday dates

    Doesn't matter, but you can use:

    =A9-DATE(YEAR(A9);1;0)

    To fix it.
    "Relax. What is mind? No matter. What is matter? Never mind!"

  13. #13
    Registered User
    Join Date
    07-12-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Birthday dates

    OK - now its working fine thank you again

+ 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.2.0