Home
Challenges
Calculate Discount Based on Category
Analysis
Easy

Calculate Discount Based on Category

An Excel sales sheet uses different discount rates by category, and you need to apply the right rate and total each discount amount.

AuthorExcelClash Team
PublishedApr 02, 2026
Calculate Discount Based on Category

The Problem

Discount rules usually start simple and then get messy fast. One department gets a small cut, another gets a bigger one, and suddenly the pricing sheet has to remember more than one percentage. If the wrong rate lands on the wrong row, the final price can still look normal enough to pass a quick glance, which makes the mistake harder to catch later.

This challenge keeps the focus on one real workflow: read the category, apply the matching discount, and make sure the summary at the bottom reflects the full set of discounts clearly. The flow below shows that same row-level path from category to rate to discount amount.

Category discount problem flow
The Problem: Category Pricing Rules Each row needs the right discount rate before the total discount can be reviewed.

The workbook already knows the product categories, so the real job is keeping each row tied to the right rate without forcing someone to type the discount by hand.

  • Electronics needs the smallest cut.
  • Furniture gets the bigger discount.
  • Clothing sits between the two.

That is what makes this a useful pricing exercise instead of a simple multiplication drill. The row has to read the category first, choose the right rate, calculate the discount amount, and then feed a summary that checks the whole list.

How We Solve It

The logic starts with category matching. Excel checks the category in column B, chooses the correct percentage, and multiplies it by the base price in column C.

The challenge solution uses IFS, but the same pricing logic can also be expressed with SWITCH or a lookup table when the workbook gets larger.

Method 1: IFS by Category

IFS Discount Illustration
Method 1: Use IFS to apply a different rate based on the category in the row.

IFS works well when you have a short set of categories and each one maps to a different formula. Excel checks the department name and uses the corresponding percentage for that row.

This is the most direct fit for the challenge because the rates are simple and the list of categories is small.

=IFS(B2="Electronics",C2*0.05,B2="Furniture",C2*0.2,B2="Clothing",C2*0.15)

Method 2: SWITCH to Return the Rate

Switch Rates Illustration
Method 2: Use SWITCH to convert the category into a discount rate first.

SWITCH is helpful when you want the category-to-rate mapping to be easy to read. Instead of writing the multiplication directly inside each condition, you can return the rate and multiply once.

That makes the formula feel cleaner when the same price calculation happens after the category is identified.

=C2*SWITCH(B2,"Electronics",0.05,"Furniture",0.2,"Clothing",0.15)

Method 3: Use a Separate Rates Table

VLOOKUP Rates Illustration
Method 3: Use a lookup table when discount rates need to be maintained separately.

If the rates change often, a separate table is easier to maintain. A lookup formula can fetch the correct rate from that table and keep the main pricing area cleaner.

That approach is not required here, but it is useful when category rules start growing beyond a few hard-coded options.

=C2*VLOOKUP(B2,$F$2:$G$4,2,FALSE)

Function Explanation

1. IFS

IFS checks multiple conditions in order and returns the first matching result. In this challenge, that means applying the correct discount rule based on the category in the row.

It is useful when category rules are few, clear, and handled directly in one formula.

Learn more this functionIFS

2. SWITCH

SWITCH maps one value to a matching result. Here, that means turning a category like Furniture into a discount rate like 0.2.

This can make category formulas easier to scan when the matching part is more important than the calculation part.

Learn more this functionSWITCH

3. SUM

SUM adds the calculated discount amounts together. In the summary area, it tells you the total discount value being given across all rows.

That turns the row-level calculations into a single total the business can review quickly.

Learn more this functionSUM

The most common mistake here is using the wrong decimal rate. A 15 percent discount should be written as 0.15, not 15.

Try Yourself

Calculate the discount amount for each product using the department category in column B and the base price in column C. Once every row is done, finish the summary section so the worksheet shows both the total number of records and the total discount value being offered.

1
Objective #1
Cell: D2-D6

In Column D, calculate the Discount Amount for every product. Rates are: Electronics = 5% (0.05), Furniture = 20% (0.2), Clothing = 15% (0.15). Multiply the price by these rates.

2
Objective #2
Cell: B9

In cell B9, count the total number of products in your inventory list.

3
Objective #3
Cell: B10

In cell B10, identify the absolute total (SUM) of all discounts provided across the entire roster.

Tactical Arena
Objectives Met: 0 / 0
Share this challenge
Share this challenge

Let others know about this challenge!

Related Challenges
Cleanup
#34
Remove Non-Numeric Characters

An Excel price column contains mixed text, and you need to strip out non-numeric characters so the values can be calculated.

Easy
Analysis
#35
Find the Second Best Sale

An Excel sales leaderboard needs ranking detail, and you need to identify the second-highest result and the person behind it.

Hard
Cleanup
#36
Check if Text is All Caps

An Excel code list needs review, and you need to flag which entries are fully typed in uppercase and which are not.

Easy
Analysis
#37
Calculate Pro-Rated Costs

An Excel billing sheet needs partial charges, and you need to calculate how much of a monthly cost applies to each service period.

Hard
Discussion
0 Feedbacks
ExcelClash

ExcelClash is an interactive platform designed to level up your Excel skills through real-world exercises and challenges. Sharpen your logic, solve real spreadsheet problems, and learn faster—without boring lessons. Just hands-on practice that actually sticks.

Navigation
Back to Challenges
Go to Dashboard
Platform Home
Discover
SUM FunctionsLookup FunctionsConditional FunctionsLogical Functions
Support
About UsContact UsPrivacy PolicyTerms of Service
© 2026 ExcelClash, Inc. All rights reserved.
Objectives Met: 0 / 0