Results 1 to 9 of 9
  1. #1
    Star Lounger
    Join Date
    Jan 2002
    Location
    Houston, Texas, USA
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Birth Dates (Excel 2003)

    My spreadsheet tells me how old people are on their next birthday. If my birthday falls within a week before the date I pull up the spreadsheet, I'd like to know TRUE or FALSE that the birthdate is within those 7 days.

  2. #2
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Birth Dates (Excel 2003)

    The following should do the trick.

    =IF(AND(DATE(YEAR(NOW()),MONTH(A1),DAY(A1))-NOW()<=7,DATE(YEAR(NOW()),MONTH(A1),DAY(A1))-NOW()>0),TRUE,FALSE)

  3. #3
    Star Lounger
    Join Date
    Jan 2002
    Location
    Houston, Texas, USA
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Birth Dates (Excel 2003)

    Oops. This would be fine, but the date isn't Now(), it's given. So, I have birthday 10/8/56 and on 10/15/07, I want to see if that person has a birthday anytime within 7 days of when I pull it up, it'll say true, else it says false.

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Birth Dates (Excel 2003)

    Hi Dea,

    Try:
    =IF(ABS(DATE(YEAR(NOW()),MONTH(A1),DAY(A1))-NOW())<8,TRUE,FALSE)
    This solution should work for a birthdate in A1 - it tests the birthdate in that cell against the current date.

    If you want to test the birthdate against another date, replace both NOW() functions with a reference to the cell the comparison date is in.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Birth Dates (Excel 2003)

    Did you try mbarron's formula? As I read the formula, that is exactly what it does. If it does not work, then I do not understand your question.
    Legare Coleman

  6. #6
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,820
    Thanks
    133
    Thanked 481 Times in 458 Posts

    Re: Birth Dates (Excel 2003)

    If a person is exceptionally healthy and will be 108 on their next birthday they'll be out of luck with that spreadsheet solution.

    zeddy

  7. #7
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Birth Dates (Excel 2003)

    mbarron's formula needs a small tweek in that case:

    <code>
    =IF(AND(DATE(YEAR(NOW()),MONTH(A1),DAY(A1))-TODAY()<=7,DATE(YEAR(NOW()),MONTH(A1),DAY(A1))-TODAY()>=0),TRUE,FALSE)
    </code>
    Legare Coleman

  8. #8
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,820
    Thanks
    133
    Thanked 481 Times in 458 Posts

    Re: Birth Dates (Excel 2003)

    ..so how did you put the birthdate of our 108-year old into cell A1???


    zeddy

  9. #9
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Birth Dates (Excel 2003)

    Since you said that he would be 108 on his next birthday, I made him slightly less than 108 and set his birthday as 10/9/1900 (I was testing this yesterday). <img src=/S/yep.gif border=0 alt=yep width=15 height=15>
    Legare Coleman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •