Sobre este ejercicio
Un conjunto de datos de 100 filas en una hoja, 2 celdas de respuesta, unos 7 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
- F2
=IF(ISNUMBER(D2),AND(D2=INT(D2),D2>=$I$2,D2<=$I$3),FALSE) - I4
=COUNTIF(F2:F101,FALSE)
A Whole number rule in data validation accepts an entry only if it is a number, has no fractional part and lies between the minimum and the maximum, both included. The helper column applies the same three tests to the quantities that are already there. ISNUMBER(D2) rejects text — also "15" typed as text, which looks like a number but is ignored by SUM; D2=INT(D2) rejects decimals such as 12.5; D2>=$I$2 and D2<=$I$3 keep the limits in their cells, so 1 and 100 pass and 101 fails. IF runs the tests only when D2 is a number, because AND evaluates every argument and would turn INT("ten") into #VALUE!.
Pitfall 1: =AND(ISNUMBER(D2),D2=INT(D2),…) looks right but returns #VALUE! for the word rows (3, 50): AND does not stop at the first FALSE. Use IF(ISNUMBER(D2),AND(…),FALSE), or wrap the AND in IFERROR(…,FALSE). Pitfall 2: text that looks like a number (rows 9, 94) is not counted by SUM and not accepted by a Whole number rule; convert it with VALUE or Data → Text to Columns before it reaches a total. Pitfall 3: > and < instead of >= and <= reject the limits themselves (rows 7, 76, 92, 101); the dialog's "between" includes both limits. Alternatives: MOD(D2,1)=0 and ROUND(D2,0)=D2 are other whole-number tests — keep them inside the IF as well. A Custom validation rule can use the helper's formula directly: =IF(ISNUMBER(D2),AND(D2=INT(D2),D2>=$I$2,D2<=$I$3),FALSE). Data validation only checks new typing: values already in the column or pasted over it are not re-checked, which is why the helper column (or Circle Invalid Data in desktop Excel) is the audit step.
Otras formas válidas
- =IFERROR(AND(ISNUMBER(D2),D2=INT(D2),D2>=$I$2,D2<=$I$3),FALSE) — IFERROR turns the #VALUE! of the word rows into FALSE
- =IF(ISNUMBER(D2),AND(MOD(D2,1)=0,D2>=$I$2,D2<=$I$3),FALSE) — MOD(D2,1) is the fractional part
- =IF(ISNUMBER(D2),AND(D2=ROUND(D2,0),D2>=$I$2,D2<=$I$3),FALSE) — ROUND to 0 decimals as the whole-number test
- =SUMPRODUCT(--(F2:F101=FALSE)) — another way to count the FALSE rows
Errores frecuentes
Leaving out the whole-number test: =IF(ISNUMBER(D2),AND(D2>=$I$2,D2<=$I$3),FALSE) marks 3 decimal quantities such as 12.5 as valid, although the warehouse cannot ship half a unit.
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.