Informazioni sull’esercizio
Un set di dati di 51 righe su un foglio, 2 celle di risposta, circa 6 minuti. Correzione nel tuo browser: il valore e la formula che lo produce, con indicazioni su cosa sistemare.
Come risolverlo
- 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").
Altri metodi validi
- =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
Errori comuni
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.
Come valutiamo
È accettata qualsiasi formula che produce il risultato giusto, a meno che l’attività non indichi una funzione: in quel caso un’altra funzione vale metà dei punti. Confrontiamo i valori con una piccola tolleranza e ignoriamo maiuscole, minuscole e spazi nel testo. Un numero corretto digitato a mano invece di una formula vale metà dei punti. Le attività su più celle valgono il punteggio pieno con il 100% delle celle giuste, metà dei punti dal 50%. Dove serve, cambiamo anche una cella di input su una copia del tuo foglio e controlliamo che la formula si aggiorni.
Risposte calcolate con le regole di Excel 365 e verificate nel nostro correttore in data 16 novembre 2026. Autore: GridBelt team.