Saltar al contenido
GridBelt
  • Prueba de Excel
  • Práctica
  • Programas
  • Precios
Iniciar sesión
Empezar la prueba gratuita
  • Prueba de Excel
  • Práctica
  • Programas
  • Precios
Iniciar sesiónCrear cuenta
Empezar la prueba gratuita
GridBelt

Practica Excel en tu navegador.

Prueba de Excel

  • Nivel 1: Principiante
  • Nivel 2: Intermedio
  • Nivel 3: Experto
  • Prueba de Excel en 7 días
  • Clasificación
  • Prueba de Excel para entrevistas
  • Evaluación de Excel de Indeed

Práctica

  • Todos los ejercicios
  • Programas
  • Para principiantes

Guías

  • Fórmulas de Excel
  • Atajos de Excel

Empresa

  • Acerca de
  • Precios
  • Cómo corregimos

© GridBelt. Todos los derechos reservados.

  • Política de privacidad
  • Términos de uso
  • Política de reembolso

Excel es una marca comercial de Microsoft Corporation. Indeed, TestGorilla, SHL y otras marcas son propiedad de sus respectivos titulares. GridBelt es un sitio de práctica independiente y no está afiliado a Microsoft, TestGorilla, SHL ni Indeed, ni respaldado ni patrocinado por ellos.

  1. Práctica
  2. /
  3. COUNTIF and COUNTIFS

COUNTIFS practice: count orders between two dates in 300 rows

  • Intermedio
  • ~6 min
  • COUNTIF and COUNTIFS

Enunciado en inglés

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.

Qué tienes que hacer

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

Celdas de respuesta

Corrección

Escribe tu fórmula en la cuadrícula, presiona Enter y luego haz clic en Comprobar. Evaluamos el valor de cada celda de respuesta y la fórmula que lo produce.

Tareas

  1. Sin comprobarIn 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.

Para las tareas de hoja de cálculo se recomienda una pantalla grande. La hoja se desplaza dentro de este recuadro.

StartInsertFormulasDataView
A1fxPreparando tu libro…
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

Escribe tu fórmula en la hoja y luego comprueba.

Sobre este ejercicio

Un conjunto de datos de 300 filas en una hoja, una celda de respuesta, unos 6 minutos. Se corrige en tu navegador: el valor y la fórmula que lo produce, con comentarios que te dicen qué arreglar.

Cómo resolverlo

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

Otras formas válidas

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

Errores frecuentes

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.

Cómo corregimos

Se acepta cualquier fórmula que produzca el resultado correcto, salvo que la tarea nombre una función: entonces otra función obtiene media puntuación. Comparamos los valores con una pequeña tolerancia y, en el texto, ignoramos mayúsculas y espacios. Un número correcto escrito a mano en lugar de una fórmula obtiene media puntuación. Las tareas de varias celdas obtienen la puntuación completa con el 100% de las celdas correctas y media puntuación desde el 50%. Cuando importa, también cambiamos una celda de entrada en una copia de tu hoja y comprobamos que tu fórmula se adapta.

Respuestas calculadas con las reglas de Excel 365 y comprobadas en nuestro corrector el 16 de noviembre de 2026. Autor: GridBelt team.

En estos programas

  • Excel for Data AnalystsDía 2

Ejercicios relacionados

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

Referencia de la función

Documentación oficial

Siguiente ejercicio

Sales by region with SUMIF