To find the difference between two dates, you can subtract the older date from the newer one. That will return the difference in days; however, you might want it in weeks, months, or years.
The little-known DATEDIF function is the perfect solution for this. You won't see any mention of it in Excel, as it's undocumented. However, its versatility prevents the need to construct long, windy formulas to achieve the same result, and therefore worth considering.
Just make sure you use it responsibly…
𝗦𝘆𝗻𝘁𝗮𝘅
= DATEDIF ( 𝚜𝚝𝚊𝚛𝚝_𝚍𝚊𝚝𝚎 , 𝚎𝚗𝚍_𝚍𝚊𝚝𝚎 , 𝚞𝚗𝚒𝚝 )
➤ 𝚜𝚝𝚊𝚛𝚝_𝚍𝚊𝚝𝚎 — the start date.
➤ 𝚎𝚗𝚍_𝚍𝚊𝚝𝚎 — the end date.
➤ 𝚞𝚗𝚒𝚝 — the time unit the date difference is returned in:
‣ Y — difference in complete years.
‣ M — difference in complete months.
‣ D — difference in days.
‣ MD — difference in days, ignoring months and years.
‣ YM — difference in months, ignoring days and years.
‣ YD — difference in days, ignoring years.
More information about DATEDIF is found at https://support.microsoft.com/en-gb/o....
#exceleration #excel #microsoftexcel #excelformulas #exceltips #globalexcelsummit
---
The Global Excel Summit is the world's largest gathering of Microsoft Excel users and experts.
Learn more at https://globalexcelsummit.com/.
Find us on:
👔 LinkedIn: / global-excel-summit
🐤 Twitter: / excelsummit
🟦 Facebook: / globalexcelsummit
📸 Instagram: / globalexcelsummit
🤳 TikTok: / globalexcelsummit