Looking for a formula or VBA code that will return the age in the same cell where I had input the birthdate

milt2010

Board Regular
Joined
Dec 18, 2010
Messages
118
Hello to all,
as I wrote in the title, I would like to enter a birth date in a cell and get the corresponding age back in the same cell, after I press return or another key.

Thanks in advance for any help
 
Ok.....have you tried the code with Sheets / cells unprotected ??
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
I did another test, with the worksheet protected and I verified this: before protecting it all the codes work regularly; after activating the protection, the error message appears. And, even if I open the VBA and clear the bug and remove the protection, the code does not work (even if the error message no longer appears). So, I close and restart excel and then, the worksheet (unprotected) works fine again. Perhaps, besides the protection that maybe should be fixed with a code, there is some addin that creates problems to my excel (2016 - 365)...
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top