close

I have created a form in excel which has a place for the person's date
of birth(DOB). When I enter the DOB the year shows up in the quot;agequot;
space. I am using the formula, =DATEDIF(E6, NOW(),quot;yquot;)amp;quot;quot;, in the quot;agequot;
space to create the correct age.

Here's my problem, when I do not have a DOB the number 106 shows up in
the quot;agequot; space. How can I stop this from happening?

Thanks in advance,

Steve--
doblesb
------------------------------------------------------------------------
doblesb's Profile: www.excelforum.com/member.php...oamp;userid=33665
View this thread: www.excelforum.com/showthread...hreadid=534372Put your formula in an IF statement, as in:

=if(e6=quot;quot;,quot;quot;,datedif(e6,now(),quot;yquot;))

Does this help?

--
Regards,
Fredquot;doblesbquot; gt; wrote in message
...
gt;
gt; I have created a form in excel which has a place for the person's date
gt; of birth(DOB). When I enter the DOB the year shows up in the quot;agequot;
gt; space. I am using the formula, =DATEDIF(E6, NOW(),quot;yquot;)amp;quot;quot;, in the quot;agequot;
gt; space to create the correct age.
gt;
gt; Here's my problem, when I do not have a DOB the number 106 shows up in
gt; the quot;agequot; space. How can I stop this from happening?
gt;
gt; Thanks in advance,
gt;
gt; Steve
gt;
gt;
gt; --
gt; doblesb
gt; ------------------------------------------------------------------------
gt; doblesb's Profile:
gt; www.excelforum.com/member.php...oamp;userid=33665
gt; View this thread: www.excelforum.com/showthread...hreadid=534372
gt;

=IF(E6=quot;quot;,quot;quot;,DATEDIF(E6,NOW(),quot;yquot;)amp;quot;quot;)--
davesexcel------------------------------------------------------------------------
davesexcel's Profile: www.excelforum.com/member.php...oamp;userid=31708
View this thread: www.excelforum.com/showthread...hreadid=534372
Thanks Fred Smith and Davesexcel,

That formula worked.

Steve--
doblesb
------------------------------------------------------------------------
doblesb's Profile: www.excelforum.com/member.php...oamp;userid=33665
View this thread: www.excelforum.com/showthread...hreadid=534372

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()