Informazioni sull’esercizio
Un set di dati di 300 righe su un foglio, una cella di risposta, circa 7 minuti. Correzione nel tuo browser: il valore e la formula che lo produce, con indicazioni su cosa sistemare.
Come risolverlo
- H2
=SUMIFS($E$2:$E$301,$C$2:$C$301,$G2,$D$2:$D$301,H$1)
SUMIFS adds the cells of the sum range whose row satisfies every range/criterion pair — here region equals the row label and product equals the column label. Unlike SUMIF, the sum range comes first, which is what lets you add as many conditions as you need afterwards. Mixed references make one formula fit all twelve cells: $G2 follows the row, H$1 follows the column, and the three fully locked data ranges never move, so the grid reconciles to the total of column E.
Pitfall 1: SUMIFS is not SUMIF with more arguments — the argument order differs (sum range first), and mixing them up returns 0 or #VALUE!. Pitfall 2: locking the wrong half of a label reference (G$2 or $H1) produces a grid whose first row or first column is right and the rest wrong; check the bottom-right formula after filling. Pitfall 3: criteria ranges must be the same size as the sum range; $C$2:$C$301 against $E$2:$E$300 returns #VALUE!. Alternatives: SUMPRODUCT(($C$2:$C$301=$G2)*($D$2:$D$301=H$1)*$E$2:$E$301) is the array form and works in every version; a pivot table builds the same grid interactively but needs a refresh after each paste; in Excel 365, =SUMIFS($E$2:$E$301,$C$2:$C$301,G2:G5,$D$2:$D$301,H1:J1) spills the whole 4 × 3 grid from one cell. Performance: SUMIFS stops at the referenced range and is fast even on a hundred thousand lines; avoid whole-column references inside SUMPRODUCT, which would evaluate a million rows per cell.
Altri metodi validi
- =SUMPRODUCT(($C$2:$C$301=$G2)*($D$2:$D$301=H$1)*$E$2:$E$301) — array form, same mixed references
- =SUMIFS($E$2:$E$301,$D$2:$D$301,H$1,$C$2:$C$301,$G2) — the pairs in the other order
- =SUMIFS($E$2:$E$301,$C$2:$C$301,G2:G5,$D$2:$D$301,H1:J1) in H2 — Excel 365 only; one spilling formula for the grid
Errori comuni
Filling =SUMIFS($E$2:$E$301,$C$2:$C$301,G2,$D$2:$D$301,H1) across without the mixed $: in I2 the labels slide to H2 (an answer cell) and I1, so the second column onwards adds the wrong lines or returns 0.
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.