Case 5: Target vs actual by territory

Before every quarterly review the same question comes up: who is how far from target? You build the overview by rep and territory and roll it up into regions with a RAG status for the leadership team.

In short: when rep and territory together form the key, SUMIFS with two criteria fetches actual and target safely. The gap is =MAX(0,D2-C2), and the rank is =RANK.EQ(E2,$E$2:$E$7) by attainment, not by revenue.

The situation

Q3 is closed and the reviews start next week. The sales manager wants to see for each territory how much revenue came in, what the target was, how much is missing and where each rep stands against the team. One wrinkle: since August, Emma Clarke has also covered part of West and has a small target of her own there. For the leadership team you also need one page by region with a RAG status (red, amber, green).

The workbook

  • Actuals: revenue from July to September, one row per rep, territory and month.
  • Targets: the quarterly target per rep and territory, in a different order from the overview.
  • Overview: one row per combination of rep and territory. Actual, target, attainment, gap and rank are built here.
  • Territories and Regions (task 2): the result per territory and the roll-up into North, South and West, with the RAG thresholds in I1 and I2.

Task 1: Overview by territory

Task Quarterly reviews are coming up, and sales leadership wants actual, target and gap for every territory. Since August, Emma Clarke has also covered part of West, so it is always the combination of rep and territory that counts. In C2, total the Q3 revenue from the Actuals sheet, in D2 get the target from the Targets sheet, in E2 work out attainment, in F2 the gap to target (0 once the target is met) and in G2 the rank by attainment. All formulas are filled down to row 7.

ABCDEFGH
1 Rep Territory Actual Target Attainment Gap Rank
2 Emma Clarke North
3 Daniel Hughes South
4 Priya Shah West
5 Tom Barker South
6 Olivia Reed North
7 Emma Clarke West
8
9

Step by step

Actual: =SUMIFS(Actuals!$D$2:$D$14,Actuals!$A$2:$A$14,$A2,Actuals!$B$2:$B$14,$B2). Two criteria, because Emma Clarke has revenue in two territories.

Target: the same formula on the Targets sheet. A VLOOKUP(A2,Targets!...) on the name alone would find Emma Clarke's first entry, the West target, even in her North row. SUMIFS with both criteria hits exactly the right row and works in every version of Excel.

Attainment: =C2/D2, formatted as a percentage. Gap: =MAX(0,D2-C2); a rep who has hit target has no gap, and never a negative one. Rank: RANK.EQ compares attainment with everyone else's; the fixed range $E$2:$E$7 is a must.

Task 2: Regions with a RAG status

Task For the leadership team you roll the territories up into regions. In B2, total the actual and in C2 the target for the region in A2, in D2 work out attainment, and in E2 show a RAG status: "green" from the value in I1, "amber" from I2, otherwise "red". In F2, get the region's highest single revenue, and in G2 the name of the rep who made it. All formulas are filled down to row 4.

ABCDEFGHIJ
1 Region Actual Target Attainment RAG Top revenue Top seller Green from 1
2 North Amber from 0.95
3 South
4 West
5
6

This exercise is part of Premium.

Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.

See Premium Already Premium? Log in

The first exercise in this lesson is free.

Step by step

Actual and target per region are SUMIF over the region column, and attainment is the ratio again. The RAG status is tested top down: =IF(D2>=$I$1,"green",IF(D2>=$I$2,"amber","red")). The thresholds live in cells so the leadership team can change them. In a real report you would also colour the cell with conditional formatting.

MAXIFS returns the region's highest single revenue: =MAXIFS(Territories!$C$2:$C$9,Territories!$B$2:$B$9,$A2). For the name, look for the row where region and revenue both match:

=XLOOKUP(1,(Territories!$B$2:$B$9=$A2)*(Territories!$C$2:$C$9=F2),Territories!$A$2:$A$9)

Each comparison returns a list of TRUE and FALSE, and their product is 1 only where both hold. Looking up by revenue alone would be unsafe, because the same amount could turn up in another region.

Common mistakes

Ranking by revenue instead of attainment

The biggest territory would always come first, even if it missed its target. A fair comparison uses attainment.

Gap without MAX

A rep who beats target gets a negative gap. In a total of the gaps it would hide other territories' shortfalls.

RAG checks in the wrong order

If IF tests amber first (>= 95%), territories at 110% also end up amber. The highest threshold goes first.

Check your result

  • Task 1: Emma Clarke North 64,900 against 70,000 (92.7%, gap 5,100, rank 4). Priya Shah is rank 1 with 105.1%, Daniel Hughes rank 2 with 101.7%. Olivia Reed has the largest gap at 8,900. Emma Clarke West: 8,600 against 10,000.
  • Task 2: North 140,300 against 151,000 (92.9%, red), South 115,500 against 118,000 (97.9%, amber), West 105,300 against 105,000 (100.3%, green). Top sellers: Emma Clarke, Daniel Hughes, Priya Shah.
  • Cross-check: the actual column of the overview must add up to the Actuals sheet total, here 273,900.

The functions in German Excel

EnglishGerman
SUMIFS, SUMIFSUMMEWENNS, SUMMEWENN
MAX, MAXIFSMAX, MAXWENNS
RANK.EQRANG.GLEICH
IFWENN
XLOOKUPXVERWEIS

Excel versions

According to Microsoft, MAXIFS is available from Excel 2019, and XLOOKUP in Microsoft 365 and Excel 2021 or later, not in Excel 2016 or 2019. Without XLOOKUP, get the name with =INDEX(Territories!$A$2:$A$9,MATCH(1,(Territories!$B$2:$B$9=$A2)*(Territories!$C$2:$C$9=F2),0)); in versions before Microsoft 365, confirm this formula with Ctrl+Shift+Enter. Without MAXIFS, a PivotTable with region in the rows and the maximum of revenue does the job.

Next: case 6, churn rate and cohorts

To finish, you measure how many customers drop off, how much revenue existing customers keep and how long new customers stay.

Go to case 6 Course overview

Write to us

Choose language

Select your preferred language