You want to calculate a person’s age, or figure out how many shopping days there are until Christmas.
Type the two dates into cells in a workbook. If you want to use today’s date then use the formula =TODAY(), which updates automatically each time a workbook is opened.
Click in the cell where the result is to go.
Type an = sign, as all formulae start with an equal sign. Type DATEDIF followed by an opening bracket, (. Now type in the cell reference of the oldest date, in this case B3, or click on the cell the mouse. Follow this with a comma and the cell reference of the nearest date, in this case B10. Follow this with another comma and finish the formula entry by typing the letter d between double quotes and closing the brackets.
Press the Enter key, or click the tick on the formula bar to accept the formula.
The number of days between the two dates is shown in the cell.
The DATEDIF is a function not publicised by Microsoft, but is very useful. There is no reference to it in the help files, and it does appear in the Formula Autocomplete list. DATEDIF can also calculate the number of months, or years, between dates by using “m” or “y” rather than “d” as the last argument of the formula.
In the example shown, Peter’s date of birth, B13, is the first argument, followed by the current date, B3.
For more information about our Microsoft Excel training Sydney, Australia, please visit http://www.jmdtraining.com.au/microsoft-office-training/microsoft-excel-training.
For more information about our Microsoft Excel training London, UK, please visit http://www.jmdtraining.co.uk/microsoft-office-training/microsoft-excel-training.