![]() |
Getting 106 for Birthday Formula
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 "age" space. I am using the formula, =DATEDIF(E6, NOW(),"y")&"", in the "age" space to create the correct age. Here's my problem, when I do not have a DOB the number 106 shows up in the "age" space. How can I stop this from happening? Thanks in advance, Steve -- doblesb ------------------------------------------------------------------------ doblesb's Profile: http://www.excelforum.com/member.php...o&userid=33665 View this thread: http://www.excelforum.com/showthread...hreadid=534372 |
Getting 106 for Birthday Formula
Put your formula in an IF statement, as in:
=if(e6="","",datedif(e6,now(),"y")) Does this help? -- Regards, Fred "doblesb" wrote in message ... 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 "age" space. I am using the formula, =DATEDIF(E6, NOW(),"y")&"", in the "age" space to create the correct age. Here's my problem, when I do not have a DOB the number 106 shows up in the "age" space. How can I stop this from happening? Thanks in advance, Steve -- doblesb ------------------------------------------------------------------------ doblesb's Profile: http://www.excelforum.com/member.php...o&userid=33665 View this thread: http://www.excelforum.com/showthread...hreadid=534372 |
Getting 106 for Birthday Formula
=IF(E6="","",DATEDIF(E6,NOW(),"y")&"") -- davesexcel ------------------------------------------------------------------------ davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708 View this thread: http://www.excelforum.com/showthread...hreadid=534372 |
Getting 106 for Birthday Formula
Thanks Fred Smith and Davesexcel, That formula worked. Steve -- doblesb ------------------------------------------------------------------------ doblesb's Profile: http://www.excelforum.com/member.php...o&userid=33665 View this thread: http://www.excelforum.com/showthread...hreadid=534372 |
All times are GMT +1. The time now is 09:54 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com