Vai al contenuto
GridBelt
  • Test Excel
  • Esercizi
  • Programmi
  • Prezzi
Accedi
Inizia il test gratuito
  • Test Excel
  • Esercizi
  • Programmi
  • Prezzi
AccediCrea un account
Inizia il test gratuito
GridBelt

Esercitati con Excel nel tuo browser.

Test Excel

  • Livello 1: Principiante
  • Livello 2: Intermedio
  • Livello 3: Esperto
  • Test Excel in 7 giorni
  • Classifica
  • Test Excel per il colloquio
  • Valutazione Excel di Indeed

Esercizi

  • Tutti gli esercizi
  • Programmi
  • Per principianti

Guide

  • Formule Excel
  • Scorciatoie Excel

Azienda

  • Chi siamo
  • Prezzi
  • Come valutiamo

© GridBelt. Tutti i diritti riservati.

  • Informativa sulla privacy
  • Termini di utilizzo
  • Politica di rimborso

Excel è un marchio di Microsoft Corporation. Indeed, TestGorilla, SHL e gli altri marchi appartengono ai rispettivi proprietari. GridBelt è un sito di esercitazione indipendente e non è affiliato a Microsoft, TestGorilla, SHL o Indeed, né approvato o sponsorizzato da queste società.

  1. Esercizi
  2. /
  3. COUNTIF and COUNTIFS

COUNTIFS practice: count orders between two dates in 300 rows

  • Intermedio
  • ~6 min
  • COUNTIF and COUNTIFS

Testo dell’esercizio in inglese

The order log holds 300 orders from July to October 2026 with the order date in column B. The monthly report asks how many orders fall inside a reporting period whose start and end dates are typed into H2 and H3 — August at the moment, but the same sheet is reused every month. Count the orders from the start date to the end date, both days included, with a formula that reads the two date cells.

Cosa devi fare

  1. 1Click H4. The order dates are in B2:B301; the period starts on the date in H2 and ends on the date in H3.
  2. 2A date condition in COUNTIFS is text joined to a cell: ">="&H2 means "on or after the date in H2" and "<="&H3 means "on or before the date in H3". Each condition needs its own copy of the date range.
  3. 3Write COUNTIFS with the two pairs — B2:B301 with ">="&H2, then B2:B301 with "<="&H3 — and press Enter.
  4. 4Change H2 to 2026-08-15: the count must fall; set it back and click Check (Ctrl+Enter / ⌘+Return).

Celle di risposta

Correzione

Scrivi la formula nella griglia, premi Enter, poi Verifica. Valutiamo il valore in ogni cella di risposta e la formula che lo produce.

Attività

  1. Non verificatoIn H4, count the orders whose date in B2:B301 is between the start date in H2 and the end date in H3 (both inclusive), using COUNTIFS with the two date cells as criteria.

Consigliato il computer per le attività sul foglio di calcolo. Il foglio scorre all’interno di questo riquadro.

StartInsertFormulasDataView
A1fxPreparazione della cartella di lavoro…
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

Inserisci la formula nel foglio, poi verifica.

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.

In questi programmi

  • Excel for Data AnalystsGiorno 2

Esercizi correlati

  • Orders per region and month with COUNTIFSIntermedio, ~7 min
  • Orders per status with COUNTIFPrincipiante, ~5 min
  • Total of orders above $500Principiante, ~4 min

Guida alla funzione

Documentazione ufficiale

Esercizio successivo

Sales by region with SUMIF