Skip to content
GridBelt
  • Excel Test
  • Practice
  • Programs
  • Pricing
Sign in
Start the free test
  • Excel Test
  • Practice
  • Programs
  • Pricing
Sign inCreate account
Start the free test
GridBelt

Practice Excel in your browser.

Excel Test

  • Level 1: Beginner
  • Level 2: Intermediate
  • Level 3: Expert
  • Excel test in 7 days
  • Leaderboard
  • Excel test for interview
  • Indeed Excel assessment

Practice

  • All exercises
  • Programs
  • For beginners

Guides

  • Excel formulas
  • Excel shortcuts

Company

  • About
  • Pricing
  • How we grade

© GridBelt. All rights reserved.

  • Privacy Policy
  • Terms of Use
  • Refund Policy

Excel is a trademark of Microsoft Corporation. Indeed, TestGorilla, SHL and other marks are the property of their owners. GridBelt is an independent practice site and is not affiliated with, endorsed by or sponsored by Microsoft, TestGorilla, SHL or Indeed.

  1. Practice
  2. /
  3. Date functions

DATEDIF practice: days to the next review and tenure in years for 50 employees

  • Beginner
  • ~6 min
  • Date functions

HR tracks 50 employees with their start date and the date of their next performance review. The report is dated 2026-10-30 — that date sits in B1 and plays the role TODAY() would play on a live sheet, so the results can be checked. For each person the team needs the number of days until the review (5 reviews are already overdue and will show a negative number) and the completed years of service, for the long-service awards (30 people have 10 years or more). Fill F3:F52 and G3:G52 with formulas that keep pointing at the report date in B1.

What you need to do

  1. 1Click F3 and type =E3-B1, then — with the cursor on B1 — press F4 (Windows) or ⌘T (Mac) so it reads =E3-$B$1. Press Enter: -14 days (dates are stored as numbers, so subtracting them gives days).
  2. 2If F3 shows a date instead of a number, set its format to General (Ctrl+Shift+~ on Windows, Control+Shift+~ on Mac).
  3. 3Click G3 and type =DATEDIF(D3,$B$1,"y") — start date, end date, unit "y" for completed years. Press Enter: 22.
  4. 4Fill F3:G3 down to row 52 (select F3:G52, Ctrl+D / ⌘D). Then change B1 to another date and watch both columns update — that is the point of keeping the report date in one cell.

Answer cells

Feedback

Type your formula in the grid, press Enter, then Check. We grade the value in each answer cell and the formula behind it.

Tasks

  1. Not checkedIn F3, compute the days from the report date in B1 to the review date in E3 (E3 minus $B$1; negative means overdue) and fill down to F52 — use the date in B1, not TODAY(), so the result stays checkable.
  2. Not checkedIn G3, use DATEDIF with the "y" unit to count the completed years between the start date in D3 and the report date in B1, then fill down to G52.

Desktop recommended for spreadsheet tasks. The sheet scrolls inside this box.

StartInsertFormulasDataView
A1fxPreparing your workbook…
A
B
C
D
E
F
G
H
I
J
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Sheet1

Enter your formula in the sheet, then check.

About this exercise

A 51-row dataset on one sheet, 2 answer cells, about 6 minutes. Graded in your browser: the value and the formula behind it, with feedback that names the fix.

How to solve it

  • F3=E3-$B$1
  • G3=DATEDIF(D3,$B$1,"y")

Excel stores dates as day counts (serial numbers), so subtracting two dates returns the number of days between them — E3−$B$1 is positive for a future review and negative for an overdue one. DATEDIF(start, end, "y") counts only completed years: the count steps up on the anniversary day, which is exactly what a service award needs. Keeping the report date in B1 and locking it with $B$1 means every row compares against the same date and the whole sheet moves when you change that one cell.

Pitfall 1: =E3-TODAY() gives the same numbers only on 2026-10-30; a day later every value has changed and a saved report can no longer be reproduced. On a live tracker TODAY() is right — for anything that gets filed or graded, pin the date in a cell. (2 of these employees would already show a different tenure on 2026-11-16.) Pitfall 2: DATEDIF is not in the function list or autocomplete (it is kept for Lotus 1-2-3 compatibility) but works in every Excel version; type it in full. The start date must be on or before the end date, otherwise it returns #NUM!. Pitfall 3: the "md" unit (days ignoring months and years) is documented by Microsoft as unreliable — it can return a negative number around month ends such as 31 January to 1 March. Prefer "d", "m", "y", "ym" and "yd". Alternatives: INT(YEARFRAC(D3,$B$1)) or INT(($B$1-D3)/365.25) look equivalent but can be off by one right around an anniversary; DATEDIF compares calendar dates and is exact. Formatting: a subtraction of dates sometimes inherits the date format and shows 1900-01-14 instead of 14 — switch the cell to General. Version note: workbooks created on old Mac versions may use the 1904 date system; copying dates between a 1900 and a 1904 workbook shifts them by 1,462 days (File → Options → Advanced → "Use 1904 date system").

Other ways that work

  • =DAYS(E3,$B$1) — same as the subtraction, written as a function (Excel 2013+)
  • =INT(YEARFRAC(D3,$B$1)) — usually identical to DATEDIF "y", but can differ by one on anniversary edge cases
  • =DATEDIF(D3,$B$1,"m") — completed months, if the award rules count in months

Common mistakes

Writing =E3-B1 without the $ signs: after filling down, row 4 subtracts B2 (a text caption) and shows #VALUE!, row 5 subtracts an empty cell. Lock the report date as $B$1.

How we grade

Any formula that produces the right result is accepted, unless the task names a function: then another function earns half credit. We compare values with a small tolerance and ignore case and spaces in text. A correct number typed by hand instead of a formula earns half credit. Multi-cell tasks earn full credit at 100% of cells, half credit from 50%. Where it matters, we also change an input cell on a copy of your sheet and check that your formula follows.

Answers computed with Excel 365 rules and checked in our grading engine on November 16, 2026. Author: GridBelt team.

In these programs

  • Excel for Administrative AssistantsDay 1
  • Learn Excel From ScratchDay 3

Related exercises

  • Invoice due dates with EOMONTH and EDATEIntermediate, ~6 min
  • Working days to resolve tickets (NETWORKDAYS)Intermediate, ~7 min
  • Turn text dates into real dates and group by monthExpert, ~12 min

Function reference

Official documentation

Next exercise

Invoice due dates with EOMONTH and EDATE