Перейти к содержимому
GridBelt
  • Тест по Excel
  • Упражнения
  • Программы
  • Цены
Войти
Начать бесплатный тест
  • Тест по Excel
  • Упражнения
  • Программы
  • Цены
ВойтиСоздать аккаунт
Начать бесплатный тест
GridBelt

Тренируйте навыки Excel прямо в браузере.

Тест по Excel

  • Уровень 1: Начальный
  • Уровень 2: Средний
  • Уровень 3: Продвинутый
  • Подготовка к тесту по Excel за 7 дней
  • Таблица лидеров
  • Тест по Excel на собеседовании
  • Тест по Excel от Indeed

Упражнения

  • Все упражнения
  • Программы
  • Для начинающих

Материалы

  • Формулы Excel
  • Горячие клавиши Excel

Компания

  • О проекте
  • Цены
  • Как мы проверяем

© GridBelt. Все права защищены.

  • Политика конфиденциальности
  • Условия использования
  • Политика возврата средств

Excel — товарный знак корпорации Microsoft. Indeed, TestGorilla, SHL и другие товарные знаки принадлежат их владельцам. GridBelt — независимый сайт для практики: он не связан с Microsoft, TestGorilla, SHL или Indeed, не одобрен и не спонсируется ими.

  1. Упражнения
  2. /
  3. Date functions

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

  • Начальный
  • ~6 мин
  • 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.

Что нужно сделать

  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.

Ячейки ответа

Обратная связь

Введите формулу в таблицу, нажмите Enter, а затем «Проверить». Мы оцениваем значение в каждой ячейке ответа и формулу, которая его даёт.

Задания

  1. Не провереноIn 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. Не провереноIn 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.

Для заданий в таблице рекомендуем компьютер. Лист прокручивается внутри этой области.

StartInsertFormulasDataView
A1fxГотовим вашу рабочую книгу…
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

Введите формулу в лист, затем нажмите «Проверить».

Об этом упражнении

Набор данных (строк: 51) на одном листе, 2 ячейки ответа, около 6 мин. Проверка прямо в браузере: значение и формула, которая его даёт, с обратной связью о том, что исправить.

Как решить

  • 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").

Другие рабочие способы

  • =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

Частые ошибки

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.

Как мы проверяем

Принимается любая формула, которая даёт верный результат, если только задание не называет функцию: тогда другая функция даёт половину балла. Мы сравниваем значения с небольшим допуском и не учитываем регистр и пробелы в тексте. Верное число, введённое вручную вместо формулы, даёт половину балла. Задания с несколькими ячейками получают полный балл, если верны 100% ячеек, и половину — если верны от 50%. Там, где это важно, мы также меняем входную ячейку в копии вашего листа и проверяем, что формула пересчитывается правильно.

Ответы рассчитаны по правилам Excel 365 и 16 ноября 2026 г. сверены в нашей системе проверки. Автор: GridBelt team.

Входит в программы

  • Excel for Administrative AssistantsДень 1
  • Learn Excel From ScratchДень 3

Похожие упражнения

  • Invoice due dates with EOMONTH and EDATEСредний, ~6 мин
  • Working days to resolve tickets (NETWORKDAYS)Средний, ~7 мин
  • Turn text dates into real dates and group by monthПродвинутый, ~12 мин

Справка по функции

Официальная документация

Следующее упражнение

Invoice due dates with EOMONTH and EDATE