• Birth Dates (Excel 2003)

    Author
    Topic
    #445194

    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.

    Viewing 0 reply threads
    Author
    Replies
    • #1078848

      The following should do the trick.

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

      • #1078854

        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.

        • #1078856

          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
          [Fmr MS MVP - Word]

        • #1078932

          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.

          • #1078975

            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

            • #1078993

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


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

            • #1079081

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

              zeddy

            • #1079129

              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). yep

    Viewing 0 reply threads
    Reply To: Reply #1078856 in Birth Dates (Excel 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel