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. FILTER, SORT and UNIQUE

FILTER function practice: orders over $1,000 in West, counted and totalled

  • Experto
  • ~10 min
  • FILTER, SORT and UNIQUE
  • Excel 365

Enunciado en inglés

The order log for July–October 2026 holds 300 orders from five regions in A2:E301. The West regional director wants a live list of her large orders — every order over the amount in H3, all five columns — plus how many there are and what they add up to, and she wants to change the region in H2 or the amount in H3 and see everything follow. The Region column was typed by hand: 28 rows differ from the standard spelling only by letter case or a trailing space ("west", "WEST", "West "), and 73 orders belong to West once you read them that way. One West order is exactly $1,000.00 — not over it.

Qué tienes que hacer

  1. 1Click J2 and start the formula: =FILTER(A2:E301, — the first argument is the whole order table, all five columns.
  2. 2Build the include argument as two tests multiplied together: (TRIM(C2:C301)=H2)*(E2:E301>H3). TRIM strips the stray spaces before the comparison, the comparison itself ignores letter case, and > (not >=) leaves out the order of exactly $1,000.00.
  3. 3Add the third argument so an empty result reads as text instead of #CALC!: ..., "No orders") and press Enter. The matching orders spill into J2:N52 on their own — keep those cells empty, or Excel shows #SPILL!.
  4. 4Click H4 and count the matches with the same test: =ROWS(FILTER(A2:A301,(TRIM(C2:C301)=H2)*(E2:E301>H3))), or =SUMPRODUCT((TRIM(C2:C301)=H2)*(E2:E301>H3)).
  5. 5Click H5 and add them up: =SUM(FILTER(E2:E301,(TRIM(C2:C301)=H2)*(E2:E301>H3))).
  6. 6Test it: type 5000 in H3 or North in H2 and watch the list, the count and the total change (Ctrl+Z / ⌘Z undoes the edit). Put West and 1000 back before you check.

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 J2, use FILTER to list every order (all columns A:E) whose region matches H2 — compared after TRIM — and whose amount is over the amount in H3; return "No orders" when nothing matches. The list spills across J:N.
  2. Sin comprobarIn H4, count how many orders match the region in H2 (trimmed) and are over the amount in H3 — for example ROWS around a FILTER, or SUMPRODUCT over the same two tests.
  3. Sin comprobarIn H5, add up the amounts of those same orders — SUM around a FILTER of column E, or SUMPRODUCT.

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, 3 celdas de respuesta, unos 10 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

  • J2=FILTER(A2:E301,(TRIM(C2:C301)=H2)*(E2:E301>H3),"No orders")
  • H4=ROWS(FILTER(A2:A301,(TRIM(C2:C301)=H2)*(E2:E301>H3)))
  • H5=SUM(FILTER(E2:E301,(TRIM(C2:C301)=H2)*(E2:E301>H3)))

FILTER keeps the rows of A2:E301 for which the include argument is TRUE. Two conditions are combined by multiplying them: TRUE*TRUE is 1, anything else is 0, so (TRIM(C2:C301)=H2)*(E2:E301>H3) is an AND that works across a whole column at once. TRIM matters because "West " with a trailing space is not equal to "West" — and the first large West order in this log is typed exactly like that — while > keeps the $1,000.00 order out, because it is not over $1,000. The optional third argument replaces the #CALC! error with "No orders" when nothing qualifies, and ROWS and SUM around the same FILTER give the count and the total.

Pitfall 1: text comparisons in Excel ignore case but not spaces; TRIM also collapses double spaces inside a name, while CLEAN removes the non-printing characters that copy-pastes bring along. Pitfall 2: use * for AND and + for OR between array conditions; AND() and OR() collapse the arrays to a single TRUE/FALSE and FILTER then returns everything or nothing. Pitfall 3: ROWS(FILTER(...,"No orders")) returns 1 for an empty result because the fallback text is a 1×1 array — count with a FILTER that has no fallback, or with SUMPRODUCT((TRIM(C2:C301)=H2)*(E2:E301>H3)), which returns 0. Alternatives: SUMPRODUCT handles the count, and SUMPRODUCT((TRIM(C2:C301)=H2)*(E2:E301>H3),E2:E301) the total, in Excel 2019; COUNTIFS and SUMIFS are faster on very large tables but cannot TRIM the criteria range, so they miss the 3 rows typed "West " here — clean the column first. Layout: a spilled list grows and shrinks, so never put anything below or to the right of its anchor; SORT(FILTER(...),5,-1) sorts the result by amount, and CHOOSECOLS(FILTER(...),1,5) returns only the columns you need. Version note: FILTER and SORT need Excel 365 or Excel 2021 (CHOOSECOLS: Excel 365); in Excel 2019 the equivalent is an AutoFilter plus SUBTOTAL, or Advanced Filter for a static copy.

Otras formas válidas

  • =SUMPRODUCT((TRIM(C2:C301)=H2)*(E2:E301>H3)) — the count without FILTER (works in Excel 2019)
  • =SUMPRODUCT((TRIM(C2:C301)=H2)*(E2:E301>H3),E2:E301) — the total without FILTER
  • =FILTER(A2:E301,(TRIM(C2:C301)=H2)*(E2:E301>H3)) — the same list without the fallback; shows #CALC! when nothing matches
  • =SORT(FILTER(A2:E301,(TRIM(C2:C301)=H2)*(E2:E301>H3),"No orders"),5,-1) — largest order first (a different order, so not for this check)

Errores frecuentes

Comparing the region without TRIM: =FILTER(A2:E301,(C2:C301=H2)*(E2:E301>H3)) skips the 3 matching orders typed "West " — including the very first one, so J2 shows SO-41012 instead of SO-41008 and H4 shows 48 instead of 51.

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 6
  • Excel for Data AnalystsDía 11
  • Excel for Sales and MarketingDía 9

Ejercicios relacionados

  • List unique customers (UNIQUE) — remove duplicatesIntermedio, ~8 min
  • Products ranked by sales with SORTBYExperto, ~8 min
  • Highlight the top 10 % of salesIntermedio, ~8 min

Referencia de la función

Documentación oficial

Siguiente ejercicio

Products ranked by sales with SORTBY