0
0
Excelspreadsheet~20 mins

DATEDIF for date differences in Excel - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
DATEDIF Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate
2:00remaining
Calculate full years between two dates
You have a start date in cell A1 (01/01/2015) and an end date in cell B1 (01/01/2023). Which formula correctly calculates the number of full years between these two dates using DATEDIF?
A=DATEDIF(A1, B1, "D")
B=DATEDIF(A1, B1, "M")
C=DATEDIF(A1, B1, "Y")
D=DATEDIF(B1, A1, "Y")
Attempts:
2 left
💡 Hint
Remember, the third argument in DATEDIF specifies the unit: "Y" for years, "M" for months, "D" for days.
📊 Formula Result
intermediate
2:00remaining
Calculate months excluding years
Given a start date in A1 (15/01/2020) and an end date in B1 (10/06/2023), which formula returns the number of months after counting full years (i.e., months excluding full years) between the two dates?
A=DATEDIF(A1, B1, "YM")
B=DATEDIF(A1, B1, "M")
C=DATEDIF(B1, A1, "YM")
D=DATEDIF(A1, B1, "Y")*12
Attempts:
2 left
💡 Hint
Use the unit that counts months ignoring full years.
Function Choice
advanced
2:00remaining
Choose the correct DATEDIF formula for total days difference
You want to find the total number of days between two dates in A1 and B1. Which formula correctly uses DATEDIF to get this total days difference?
A=DATEDIF(A1, B1, "D")
B=DATEDIF(B1, A1, "D")
C=DATEDIF(A1, B1, "MD")
D=DATEDIF(A1, B1, "Y")*365
Attempts:
2 left
💡 Hint
The unit "D" returns total days difference.
🎯 Scenario
advanced
3:00remaining
Calculate age in years, months, and days
You have a birthdate in cell A1 (10/03/1990) and today's date in B1 (25/06/2024). Which set of formulas correctly calculates the age as full years, remaining months, and remaining days?
AYears: =DATEDIF(B1, A1, "Y")<br>Months: =DATEDIF(B1, A1, "YM")<br>Days: =DATEDIF(B1, A1, "MD")
BYears: =DATEDIF(A1, B1, "Y")<br>Months: =DATEDIF(A1, B1, "YM")<br>Days: =DATEDIF(A1, B1, "MD")
CYears: =DATEDIF(A1, B1, "Y")<br>Months: =DATEDIF(A1, B1, "M")<br>Days: =DATEDIF(A1, B1, "D")
DYears: =DATEDIF(A1, B1, "Y")<br>Months: =DATEDIF(A1, B1, "MD")<br>Days: =DATEDIF(A1, B1, "YM")
Attempts:
2 left
💡 Hint
Use "Y" for years, "YM" for months ignoring years, and "MD" for days ignoring months and years.
📊 Formula Result
expert
2:00remaining
What error occurs with reversed dates in DATEDIF?
If cell A1 contains 01/01/2025 and B1 contains 01/01/2020, what happens when you use the formula =DATEDIF(A1, B1, "Y")?
A#VALUE! error
BReturns 5
CReturns -5
D#NUM! error
Attempts:
2 left
💡 Hint
DATEDIF requires the start date to be earlier than the end date.