📞 01223 214177 ✉️ karen@roem.co.uk
Back in July 2003 (this is not a typo) I wrote a tip about the DATEDIF function to calculate somebody's age based on their date of birth. With hindsight - wonderful thing - I feel this was a rather complicated way and as I take pride in offering easy methods I wanted to share, what I believe is, a much simpler way. It's based on the fact that you can do calculations between dates.
Here's how:
See absences.xlsx for an example.
I know this probably looks even worse, so let's break it down . . .
If you would have put today's date in a separate cell, say A1, and the date of birth in cell A2, the formula could have been as simple as =A1-A2. You then know how many days someone is alive. You then divide (hence the forward slash) that outcome by 365.25 (to cater for a leap year). And finally you will need to round the figure down, because if you are born on 12 December (someone springs to mind ;) you don't turn 60 until that specific date. Oh, and the extra brackets are because of the mathematical order of operations. Parenthesis, exponents, multiply, divide, add and subtract. Please Excuse My Dear Aunt Sally, a mnemonic to help me remember the mathematical order. And isn't it ironic that the very word, describing the technique intending to assist in remembering something, is almost impossible to remember?!
Finally, if you want to work out formulas in a workbook you inherit and don't understand, simply click anywhere in an empty cell and type the formula. For example, when you type =INT you get a little pop-up stating "Rounds a number down to the nearest integer". Similarly, when you type =NOW it states "Returns the current date and time formatted as a date and time".
Related tips
.
* Unless stated otherwise, these tips were written for Microsoft Office 2010.
I’m committed to sharing the best of what I know with others so please don’t keep me a secret. If you enjoyed today’s tip, please forward it to anyone you feel may benefit. Alternatively, feel free to reprint it (with full copyright and subscription information) in your newsletters and message boards.