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. IF function

IF and AND practice: bonus eligibility for 40 employees

  • Principiante
  • ~5 min
  • IF function

Enunciado en inglés

HR is preparing the year-end bonus list for 40 employees. The policy has two conditions, and both must hold: a performance rating of at least 4 (on a 1–5 scale) and at least 12 months of service on 31 December. Column D holds the rating and column E the months of service. Add a column that reads Eligible or Not eligible for every employee — payroll will paste it straight into the bonus run, so every row must come from the same rule.

Qué tienes que hacer

  1. 1Click F2. The rating is in D2 and the months of service in E2; both conditions must be true for a bonus.
  2. 2Build the test with AND: AND(D2>=4,E2>=12) is TRUE only when both comparisons are true. Use it as the first argument of IF, with "Eligible" and "Not eligible" as the two results.
  3. 3Press Enter and fill F2 down to F41 (double-click the fill handle, or select F2:F41 and press Ctrl+D / ⌘D).
  4. 4Check the edge cases: rating 4 with 12 months is Eligible, rating 3 with 60 months is not. Then 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 F2, use IF and AND to show "Eligible" when the rating in D2 is at least 4 and the months of service in E2 are at least 12, otherwise "Not eligible"; fill the formula down to F41.

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 40 filas en una hoja, una celda de respuesta, unos 5 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(AND(D2>=4,E2>=12),"Eligible","Not eligible")

AND combines several tests into one: AND(D2>=4,E2>=12) is TRUE only when the rating is at least 4 and the tenure is at least 12 months, and FALSE as soon as either condition fails. Nesting it inside IF turns that TRUE/FALSE into the two labels the policy needs. Filling the formula down applies the same rule to all 40 rows, so the 24 employees who meet only one condition are excluded automatically.

Pitfall 1: AND is a function, not an operator — =IF(D2>=4 AND E2>=12,…) is a syntax error, and =IF(D2>=4,IF(E2>=12,"Eligible","Not eligible"),"Not eligible") works but repeats the else-branch and gets unreadable with a third condition. Pitfall 2: mixing up AND and OR flips the policy; with OR, anyone with 60 months of service would qualify regardless of rating. Pitfall 3: a blank rating compares as 0 and quietly fails the test; decide whether blanks mean "not rated yet" and handle them with IF(D2="",…). Alternatives: =IF((D2>=4)*(E2>=12),…) multiplies the two booleans (1×1 = 1 = TRUE), a pattern you will meet again in SUMPRODUCT; IFS cannot express "both" on its own, so AND stays the right tool. Design: put the thresholds 4 and 12 in cells of their own and reference them with $ so the policy can change without editing formulas; the free-shipping exercise in this track does exactly that.

Otras formas válidas

  • =IF(AND(D2>=4,E2>=12),"Eligible","Not eligible") — reference solution
  • =IF((D2>=4)*(E2>=12)=1,"Eligible","Not eligible") — booleans multiplied instead of AND (accepted by the value check, but this task asks for AND)
  • =IF(OR(D2<4,E2<12),"Not eligible","Eligible") — the same rule stated through its failures

Errores frecuentes

Using OR instead of AND, so an employee with a rating of 3 and 60 months of service shows Eligible — the grader points at that row because only one of the two conditions holds there.

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 test in 7 days, Plan del nivel 2Día 2
  • Excel for Administrative AssistantsDía 3
  • Excel for Sales and MarketingDía 2

Ejercicios relacionados

  • Pass or Fail with IFPrincipiante, ~4 min
  • Free-shipping flag with IF and ORPrincipiante, ~6 min
  • Flag rows with missing dataIntermedio, ~5 min

Referencia de la función

Documentación oficial

Siguiente ejercicio

Free-shipping flag with IF and OR