1. Lighthouse

Level 4 · Return rate per category with COUNTIFS

The request

From Jack Sanchez, Financial Analyst

“For the November close I need the return rate per category, and the damaged returns on their own because those go into the carrier claim. The returns list is short, and lines sold per category are already in H2:H7.”

Your goal

In I2:I7, count the returns of each category in G2:G7 with COUNTIFS on B2:B60. In J2:J7, the return rate: returns ÷ lines sold (H2:H7). In K2:K7, count the returns of that category whose reason (C2:C60) equals the reason in H10. In row 8: H8, I8 and K8 add up their columns with SUM, and J8 is the overall rate, I8 ÷ H8.

  • Fill I2:K7, H8:K8 with the right valuesnot done yet
  • With formulas, not typed numbersnot done yet
  • Use COUNTIFSnot done yet

Your sheet

Excel
The sheet for this level
ABCDEFGHIJKL
1order_item_idcategoryreasonreturned_onrefund_amountcategorylines_soldreturnsreturn_ratedamaged
226731Textileschanged_mind2025-11-13115.96Decor464
326902Textilesdamaged2025-11-16169.00Furniture85
426898Textileswrong_item2025-11-1728.99Kitchen400
527194Decordamaged2025-11-17104.99Lighting205
627110Textileswrong_item2025-11-18139.00Outdoor50
727133Kitchendamaged2025-11-1811.99Textiles396
826916Decordamaged2025-11-1925.99total
926936Lightinglate2025-11-19109.00
1027028Decordamaged2025-11-22161.10Reason to countdamaged
1127340Lightingchanged_mind2025-11-2359.98
1227347Kitchenwrong_item2025-11-2460.99
1327442Kitchenchanged_mind2025-11-2413.99
1427473Furnituredamaged2025-11-25519.00
1527179Outdoorlate2025-11-26782.10
1627309Lightingdamaged2025-11-26207.96
1727792Decordamaged2025-11-29109.00
1827715Decordamaged2025-11-3025.99
1927925Textileswrong_item2025-11-3028.99
2027184Decorchanged_mind2025-12-01429.30
2127547Textileswrong_item2025-12-0186.97
2227735Kitchenchanged_mind2025-12-01436.00
2326656Textileschanged_mind2025-12-0255.98
2426862Decorchanged_mind2025-12-0212.99
2526911Kitchenchanged_mind2025-12-02179.00
2627573Kitchenlate2025-12-0270.99
2727666Furnituredamaged2025-12-021241.10
2827840Textileswrong_item2025-12-0255.98
2927876Textileschanged_mind2025-12-0220.99
3027893Lightingdamaged2025-12-03477.00
3128016Decorwrong_item2025-12-039.74
3226851Kitchenchanged_mind2025-12-0453.99
3327007Decorchanged_mind2025-12-04215.88
3427174Textileschanged_mind2025-12-05105.98
3527979Decordamaged2025-12-05161.10
3628006Decorwrong_item2025-12-0520.99
3728188Furniturechanged_mind2025-12-06660.45
3827769Kitchenchanged_mind2025-12-0710.99
3927620Textileschanged_mind2025-12-0820.99
4027918Lightingdamaged2025-12-08189.00
4127977Textileschanged_mind2025-12-0863.89
4228107Textileswrong_item2025-12-0939.74
4327165Decorchanged_mind2025-12-1020.99
4427926Textileschanged_mind2025-12-1052.99
4528286Lightingdamaged2025-12-1151.99
4627597Textileschanged_mind2025-12-1628.99
4726988Textileslate2025-12-1752.99
4827128Decorlate2025-12-17104.99
4928253Kitchenchanged_mind2025-12-18283.96
5027562Decorchanged_mind2025-12-1944.99
5127623Textileslate2025-12-21556.00
5227372Kitchenchanged_mind2025-12-22218.97
5328265Decorchanged_mind2025-12-2319.99
5427833Lightingchanged_mind2025-12-2459.98
5527360Textileschanged_mind2025-12-2551.98
5627861Decorlate2025-12-2517.99
5727537Textileschanged_mind2025-12-2627.99
5827755Textileschanged_mind2025-12-27139.00
5927692Textileschanged_mind2025-12-28278.00
6028032Decorchanged_mind2025-12-2913.49
61
62

Loading the editor…

    ResultPress Check to compare I2:K7, H8:K8

    Mote checks your result

    Press Check. Each right cell becomes a firefly in your lantern.

    The lesson

    A return rate needs two numbers: how many lines came back, and how many were sold. Jack has both, in two different shapes. The returns are a list, one row per returned line, so you count them. The lines sold come from the full November export as one number per category, already typed into H2:H7.

    The list in A2:E60 holds the 59 returned lines from completed November 2025 orders, the same orders the revenue numbers use. It leaves out refunded orders: those were paid back in full, never counted as revenue, and nearly every line on them comes back, so they would only blur the rate.

    COUNTIFS with one criterion

    COUNTIFS takes pairs of a range and a criterion and counts the rows where all of them hold:

    =COUNTIFS(criteria_range1, criterion1, [criteria_range2, criterion2], …)

    There is no range to add up, only ranges to test. In I2:

    I2   =COUNTIFS($B$2:$B$60,G2)

    Decor (G2) has 17 returned lines. Filled down to I7: Furniture 3, Kitchen 10, Lighting 7, Outdoor 1, Textiles 21. Matching is not case sensitive, so decor would count the same rows.

    From a count to a rate

    J2   =I2/H2

    Decor: 17 ÷ 464 = 3.66%. With the column formatted as a percentage, the cell holds 0.0366 and shows 3.66%; type =I2/H2*100 and the format shows 366.38%. Textiles has the highest rate at 5.30%, Outdoor the lowest at 2.00%.

    A second criterion from an input cell

    Damaged items go to the carrier claim, so Jack wants them counted on their own. The reason sits in H10, so the claim team can switch it to late or wrong_item without touching a formula:

    K2   =COUNTIFS($B$2:$B$60,G2,$C$2:$C$60,$H$10)

    Both conditions must hold on the same row: category Decor and reason damaged. Decor has 6. $H$10 is locked because every row reads the same reason; G2 moves.

    The total row

    H8, I8 and K8 are plain sums: 1,600 lines, 59 returns, 14 damaged. The overall rate is the total returns over the total lines:

    J8   =I8/H8

    That is 3.69%. Typing =AVERAGE(J2:J7) instead gives 3.40%, because a plain average gives each category the same weight whatever it sold. A rule for every report: a rate in a total row is the ratio of the totals, never the average of the rates above it.

    Read it before you send it

    • Small denominators. Outdoor’s 2.00% is 1 return out of 50 lines. One more return would make it 4%. Say “1 of 50” next to the rate.
    • Returns are still coming. The data runs to December 31, and a customer can send a late November order back in January. November’s rate can only go up; call it a floor.

    Common mistakes

    • COUNTIF with two criteria. COUNTIF takes one range and one criterion; the second pair needs COUNTIFS.
    • Averaging the rates in the total row: 3.40% instead of 3.69%.
    • Typing "damaged" into the formula. It works today, but the claim team can’t change the reason without editing six formulas.
    • Leaving H10 unlocked. Filled down, it becomes H11, an empty cell, and empty matches nothing, so the damaged counts below Decor fall to 0.

    Pick what may run on this site. You can change this any time from "Cookie settings" at the bottom of every page.