À propos de cet exercice
Un jeu de données de 250 lignes sur une feuille, 3 cellules de réponse, environ 7 minutes. Corrigé dans votre navigateur : la valeur et la formule qui la produit, avec des indications sur la correction à apporter.
Comment le résoudre
- G2
=SUMIFS($D$2:$D$251,$C$2:$C$251,F2) - G7
=SUM(G2:G6) - H2
=G2/$G$7
A PivotTable's Show Values As → % of Grand Total divides every value by the grand total of the report. The formula version does the same in two steps: SUMIFS rebuilds the Sum of Revenue per channel, and =G2/$G$7 divides each one by the locked grand total, so the Grand Total row itself comes out as 100%. The 0.0% format only changes the display (0.123 shows as 12.3%); one decimal keeps a tiny channel such as Phone orders from reading 0%.
The PivotTable route in Excel: drag Revenue to Values twice, right-click a value of the second copy → Show Values As → % of Grand Total, then rename the field (for example "% of Grand Total") and set its number format through Value Field Settings → Number Format. Pitfall 1: a PivotTable calculates the shares over the items that are visible — filter one channel out and every other share is recalculated over the rest; the formula version keeps dividing by the total in G7 unless you change that cell. Pitfall 2: =G2/G7 filled down without $ divides H3 by G8, an empty cell, and shows #DIV/0!. Pitfall 3: rounded shares need not add up to exactly 100.0% on screen (99.9% or 100.1% is normal); the stored values still sum to 1. Never multiply by 100 in the formula and then apply % — 0.123 × 100 would show as 1230.0%. With no field in Columns, % of Column Total gives the same numbers as % of Grand Total. In Excel 365, =PERCENTOF(G2,$G$2:$G$6) is the same ratio, and =GROUPBY(C2:C251,D2:D251,PERCENTOF) spills the channel labels with their shares and a Total of 100% in one formula.
Autres méthodes valables
- =SUMIF($C$2:$C$251,F2,$D$2:$D$251) in G2 — SUMIF with one condition (criteria range, criterion, sum range)
- =G2/SUM($G$2:$G$6) in H2 — divides by the channel total directly (then H7 = G7/SUM($G$2:$G$6) is still 100%)
- =SUMIFS($D$2:$D$251,$C$2:$C$251,F2)/SUM($D$2:$D$251) in H2:H6 — revenue and share in one step; the Grand Total row then needs its own =SUM(H2:H6)
- =PERCENTOF(G2,$G$2:$G$6) in H2 — Excel 365 only
Erreurs fréquentes
Filling =G2/G7 down without the $: H3 then divides by G8, an empty cell, and shows #DIV/0!; lock the grand total as $G$7.
Comment nous corrigeons
Toute formule qui produit le bon résultat est acceptée, sauf si la tâche nomme une fonction : une autre fonction rapporte alors la moitié des points. Nous comparons les valeurs avec une petite tolérance et ignorons la casse et les espaces dans le texte. Un nombre correct saisi à la main au lieu d’une formule rapporte la moitié des points. Les tâches sur plusieurs cellules rapportent tous les points avec 100 % de cellules justes, la moitié à partir de 50 %. Lorsque c’est pertinent, nous modifions aussi une cellule d’entrée sur une copie de votre feuille et vérifions que votre formule suit.
Réponses calculées selon les règles d’Excel 365 et vérifiées dans notre correcteur le 20 novembre 2026. Auteur : GridBelt team.