In a class recently the subject of age calculation came up, which reminds me of when my son was young and would ask me how old I was. “19”, I would say succinctly. He was at the age when he was learning basic maths. “So what would make you 12 when you had me..” “Yes, what can I say..I was a child bride”…
Of course as he got older that response met with a snort of derision and a muttered comment about what life in the Dark Ages before computers and the Internet…
However, back to the class. I offered two solutions to this dilemma. In both cases, because the formula uses today() – which uses…yes, you guessed it, today’s date…the age will always be current.
One of them used the Int() function (which is to just show the whole number part of an answer – assuming that you want your answer as 12 as opposed to 12 and a half.
In the second approach we used an undocumented Excel function (you won’t find it in Excel functions) called DateDif to show the difference. Both are illustrated here.
I’m in a hurry…I just want to see the file
I’d like to see how it’s done
Approach 1 – Using the Integer function.
In this video I show you how to use the Today() function with the Int() function to calculate the current age.
Approach 2 – Using the lesser known DateDif() function
This is an undocumented function in Excel and has some issues but it could be an option. You can read more about this function here.
Start_date = Date of Birth
Unit = “Y”
We are going to work through the same set of dates and we will end up with the same set of answers.
The video shows you how it’s done.