Sobre este ejercicio
Un conjunto de datos de 220 filas en una hoja, una celda de respuesta, unos 9 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
- F4
=SORT(GROUPBY(C2:C221,A2:A221,COUNTA,0,0,1,D2:D221=G1),2,-1)
Each optional argument of GROUPBY is a PivotTable setting: COUNTA as the function is "Count of Ticket ID", total_depth 0 switches the grand total off, and filter_array D2:D221=G1 is the report filter — only the rows whose priority matches G1 take part. SORT(…,2,-1) then does what "Sort Largest to Smallest" does on the count column. Because the filter value lives in a cell, typing another priority into G1 re-filters and re-ranks the whole report at once.
The PivotTable route in Excel: Priority to Filters (pick High), Agent to Rows, Ticket ID to Values (a text field is counted: "Count of Ticket ID"), Design → Grand Totals → Off for Rows and Columns, then right-click a count → Sort → Sort Largest to Smallest. Pitfall 1: sorting a GROUPBY that still has its Total row sorts the Total in with the agents — it lands on top. Switch the totals off first (total_depth 0) or drop them with DROP(…,-1). Pitfall 2: an empty argument is not a zero. In Excel, GROUPBY(…,COUNTA,0,,…) means "automatic" totals and shows the Total row; type the 0. Pitfall 3: COUNT counts numbers only, so it returns 0 for text IDs; COUNTA counts every non-empty value. Pitfall 4: ties. In this grid SORT keeps tied rows in the order GROUPBY gave them (A to Z); if the order of ties matters, give SORTBY a second key, e.g. =LET(g,GROUPBY(C2:C221,A2:A221,COUNTA,0,0,1,D2:D221=G1),SORTBY(g,CHOOSECOLS(g,2),-1,CHOOSECOLS(g,1),1)). Excel 365 can also sort inside GROUPBY: =GROUPBY(C2:C221,A2:A221,COUNTA,0,0,-2,D2:D221=G1) sorts by the 2nd column descending there, while this practice grid ignores the column number and sorts the names Z to A. Several conditions combine with *: (D2:D221=G1)*(B2:B221>=DATE(2026,10,15)). GROUPBY needs Excel for Microsoft 365.
Otras formas válidas
- =SORT(GROUPBY(FILTER(C2:C221,D2:D221=G1),FILTER(A2:A221,D2:D221=G1),COUNTA,0,0),2,-1) — filter the rows first, then group
- =LET(g,GROUPBY(C2:C221,A2:A221,COUNTA,0,0,1,D2:D221=G1),SORTBY(g,CHOOSECOLS(g,2),-1)) — SORTBY on the count column
- =GROUPBY(C2:C221,A2:A221,COUNTA,0,0,-2,D2:D221=G1) — Excel 365 only: sorts by the count inside GROUPBY (this practice grid ignores the column number in sort_order)
Errores frecuentes
Counting with COUNT instead of COUNTA: the ticket IDs are text, so every agent shows 0 and the ranking is meaningless; a PivotTable's "Count" of a text field is COUNTA.
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 20 de noviembre de 2026. Autor: GridBelt team.