Oh, my God. I quit. Is it really that much?
I mean, I knew there were a few technical glitches, and it (Excel) does
how old you are just fine, but couldn't we simply fake the future date of
the birthday, and subtract the current derived age from it to get a
result?
On Fri, 20 May 2011 17:11:48 -0700 (PDT), joeu2004 <(E-Mail Removed)>
wrote:
>On May 20, 4:01*am, SoothSayer <SaySo...@TheMonastery.org> wrote:
>> I want to add on below it that says something like:
>> "There are 42 days until Joe's next birthday..."
>
>This is non-trivial. First, I'm sure you would like it to read "is 1
>day" instead of "are 1 days". Second, we have to consider two cases:
>(a) when the BD this year is before today; and (b) when the BD this is
>on as well as after today. Third, there are issues to consider with
>leap years, both the current year and next year in some cases.
>Finally, what if the BD is Feb 29?
>
>I suggest that you put =TODAY() into a cell (A1).
>
>First, that allows you to substitute other dates for "today" for
>testing purposes; very useful. Second, it is more efficient and more
>reliable (near midnight!) to compute TODAY() only once.
>
>I also suggest that you put the BD this year and next year into
>cells. The reason will become evident below. For example:
>
>A2: =DATE(YEAR(A1),MONTH(DOB),DAY(DOB))
>A3: =DATE(1+YEAR(A1),MONTH(DOB),DAY(DOB))
>
>I assume that DOB and BirthName below are defined names or cell
>references.
>
>Then your formula becomes:
>
>=IF(OR(A2-A1=1,A3-A1=1), "There is 1 day before ",
>"There are " & IF(A2>=A1,A2,A3)-A1 & " days before ")
>& BirthName & "'s birthday"
>
>This will result in "0 days before" when today is the BD. You might
>prefer:
>
>=IF(A2=A1, "Today is " & BirthName & "'s birthday",
>IF(OR(A2-A1=1,A3-A1=1), "There is 1 day before ",
>"There are " & IF(A2>=A1,A2,A3)-A1 & " days before ")
>& BirthName & "'s birthday")
>
>Normally A2-A1=1 is sufficient. A3-A1=1 is needed when today is Dec
>31.
>
>As you can see A2 and A3 (BD this year and next year) must be
>referenced several times. That is one reason why it is best to
>compute them only one time. I do not simply add 365 because of the
>leap year and Feb 29 BD issues.
>
>Note that those formulas ignore the issue raised if the BD is Feb 29.
>As written, they will assume that the anniversary of the BD is on Mar
>1 of non-leap years. But many people choose (and some laws might
>require them) to use Feb 28.
>
>You need to decide how you want to handle the Feb 29 BD. The
>adjustment, if any, would go into A2 and A3. Another reason to put
>those formulas into A2 and A3.
>
>You wrote:
>> Or you could say the number of the age [...],
>> it would say:
>> There are 42 days before Joe (BirthName) becomes 51 years old.
>
>This becomes relatively easy once the BD this year and next year are
>computed in cells (e.g. A2 and A3).
>
>=IF(A2=A1, "Today, ",
>IF(OR(A2-A1=1,A3-A1=1), "There is 1 day before ",
>"There are " & IF(A2>=A1,A2,A3)-A1 & " days before "))
>& BirthName & " becomes "
>& IF(A2>=A1,YEAR(A2),YEAR(A3))-YEAR(A1) & " years old"
>
>Note that I do not bother to handle the special case of 1 year
>old ;-). Seriously, is that an issue?
>
>You wrote:
>> I know it is a simple variant of my formula.
>> =CONCATENATE(BirthName," is ",(DATEDIF(DOB,TODAY(),"y")
>> & " years, " & DATEDIF(DOB,TODAY(),"ym") & " months, and "
>> & *DATEDIF(DOB,TODAY(),"md") & " days
>
>That formula is flawed for several reasons. In addition to the issues
>discussed above, there is also the issue that it has been reported
>that in XL2007 SP2 and later (including any XL2010?),
>DATEDIF(...,"md") is unreliable. Google "datedif md" without quotes
>for details.