Informazioni sull’esercizio
Un set di dati di 300 righe su un foglio, una cella di risposta, circa 6 minuti. Correzione nel tuo browser: il valore e la formula che lo produce, con indicazioni su cosa sistemare.
Come risolverlo
- H4
=COUNTIFS(B2:B301,">="&H2,B2:B301,"<="&H3)
Dates are numbers in a spreadsheet, so "between two dates" is two numeric conditions on the same column: at least the start date and at most the end date. COUNTIFS applies both at once — each pair names the date column B2:B301 and a criterion built as an operator in quotes joined to the date cell with &, such as ">="&H2. Because the formula reads H2 and H3, next month's report only needs two new dates typed in, not a new formula.
Pitfall 1: writing ">=H2" inside the quotes makes the criterion the literal text ">=H2", which matches nothing — the & is what inserts the date's value, producing ">=46235" under the hood. Pitfall 2: ">" and "<" exclude the boundary days; period reports almost always mean inclusive, so use >= and <= — the grader has orders on both boundary dates. Pitfall 3: when the date column contains timestamps (with hours), "<="&H3 stops at midnight at the start of the end day; use "<"&(H3+1) to include the whole day. Pitfall 4: text that looks like a date ("2026-08-01" imported as text) is not a number and is never counted — convert it with DATEVALUE or Text to Columns first. Alternatives: SUMPRODUCT((B2:B301>=H2)*(B2:B301<=H3)) avoids the string-building and is handy inside bigger formulas; COUNTIF(B2:B301,">="&H2)-COUNTIF(B2:B301,">"&H3) subtracts the orders after the period; in Excel 365, ROWS(FILTER(B2:B301,(B2:B301>=H2)*(B2:B301<=H3))) lists and counts at once.
Altri metodi validi
- =SUMPRODUCT((B2:B301>=H2)*(B2:B301<=H3)) — array form without string criteria
- =COUNTIF(B2:B301,">="&H2)-COUNTIF(B2:B301,">"&H3) — two single-condition counts subtracted (uses COUNTIF, which this task does not accept)
- =COUNTIFS(B2:B301,">="&$H$2,B2:B301,"<="&$H$3) — absolute references; same result, handy when the formula is copied elsewhere
Errori comuni
Typing the dates into the criteria (">=2026-08-01") or forgetting the &: the comparison then happens against text, the count comes out as 0 or as the whole column, and changing H2 or H3 does nothing — the grader changes both cells and expects the count to follow.
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.