Informazioni sull’esercizio
Un set di dati di 150 righe su un foglio, 3 celle di risposta, circa 8 minuti. Correzione nel tuo browser: il valore e la formula che lo produce, con indicazioni su cosa sistemare.
Come risolverlo
- I3
=PERCENTILE.INC($E$2:$E$151,1-$I$2) - F2
=AND(ISNUMBER(E2),E2>=$I$3) - I4
=COUNTIF(F2:F151,TRUE)
PERCENTILE.INC(range, 0.9) returns the value that 90% of the numbers in the range stay below, so every store at or above it is in the top 10%. Writing it as 1-I2 keeps the share in one cell: change I2 and the cut-off, the flags and the count all follow. The flag needs two tests: ISNUMBER(E2), because Excel ranks any text above every number and "closed" would otherwise pass, and E2>=$I$3, because a store exactly on the cut-off belongs to the group — here two stores tie there. Excel's built-in Top 10% rule makes the same decision for the colours: it ranks only the numbers and keeps ties at the cut-off.
Pitfall 1: text in a number column — a comparison such as "closed">=100000 is TRUE in Excel (text sorts after numbers), so a plain E2>=$I$3 flags 7 closed stores; PERCENTILE.INC, LARGE and the built-in rule simply skip text. Pitfall 2: > instead of >= — the cut-off is $200,285, the sales of both tied stores, so > leaves 13 stores instead of 15. Pitfall 3: PERCENTILE.EXC ranks at (n + 1)·p instead of (n − 1)·p + 1 and gives other cut-offs when the share changes; this task follows PERCENTILE.INC (the same as the old PERCENTILE). Alternatives: =IF(ISNUMBER(E2),RANK.EQ(E2,$E$2:$E$151)<=ROUNDDOWN(COUNT($E$2:$E$151)*$I$2,0),FALSE) flags by rank (both tied stores share rank 14) — the IF matters, because AND evaluates every argument and RANK.EQ of "closed" is #VALUE!, which AND passes on. =LARGE($E$2:$E$151,ROUNDDOWN(COUNT($E$2:$E$151)*$I$2,0)) is the cut-off the built-in rule uses — the 14th largest value; when the count of numbers is a multiple of 10 it selects the same stores as PERCENTILE.INC (here it is even the same value, because of the tie). In a formula-based rule the helper is optional: select E2:E151, New Rule → "Use a formula to determine which cells to format" and enter =AND(ISNUMBER($E2),$E2>=$I$3) (Windows: Alt, H, L, N), which also lets you colour the whole row (select A2:F151 instead).
Altri metodi validi
- =AND(ISNUMBER(E2),E2>=PERCENTILE.INC($E$2:$E$151,1-$I$2)) — the cut-off inside the flag instead of in I3
- =PERCENTILE($E$2:$E$151,1-$I$2) — the older name of PERCENTILE.INC, same result
- =IF(ISNUMBER(E2),E2>=$I$3,FALSE) — the same flag with IF
- =COUNTIF($E$2:$E$151,">="&$I$3) — counts the top group straight from the sales (COUNTIF skips text for a ">=" criterion)
Errori comuni
Writing =E2>=$I$3 without ISNUMBER: Excel treats the text "closed" as larger than any number, so rows 40, 42, 56… are flagged TRUE and the count comes out 22 instead of 15.
Come valutiamo
È accettata qualsiasi formula che produce il risultato giusto, a meno che l’attività non indichi una funzione: in quel caso un’altra funzione vale metà dei punti. Confrontiamo i valori con una piccola tolleranza e ignoriamo maiuscole, minuscole e spazi nel testo. Un numero corretto digitato a mano invece di una formula vale metà dei punti. Le attività su più celle valgono il punteggio pieno con il 100% delle celle giuste, metà dei punti dal 50%. Dove serve, cambiamo anche una cella di input su una copia del tuo foglio e controlliamo che la formula si aggiorni.
Risposte calcolate con le regole di Excel 365 e verificate nel nostro correttore in data 16 novembre 2026. Autore: GridBelt team.