Home
Challenges
Categorize Ages into Brackets
Analysis
Easy

Categorize Ages into Brackets

An Excel age list needs clear groups, and you need to place each person into the right bracket based on thresholds.

AuthorExcelClash Team
PublishedApr 02, 2026
Categorize Ages into Brackets

The Problem

A raw age list is useful for records, but it is not always useful for decisions. Marketing, reporting, and service rules often need groups like minors, adults, and seniors instead of asking someone to interpret every number one by one.

The tricky part is the boundary between groups. Age 17 and age 18 should not be treated the same, and age 64 and age 65 should not be treated the same either. If those cutoffs are checked manually, the edge cases are exactly where mistakes usually happen.

The flow below shows the rule as a decision path. Each age moves through the thresholds in order, lands in one segment, and then those labels can be counted in the summary.

Age bracket categorization problem flow
The Problem: Turning Ages into Useful Segments Threshold order matters because each age should land in exactly one group.

In this workbook, each customer row has an age and an empty market segment cell. The challenge is to label each row consistently, then use the audit area to count the minor and senior groups without manually scanning the list.

  • Ages below 18 should land in the youngest group.
  • Ages from the adult range should not accidentally fall through to senior.
  • The summary should count the final labels, not the raw ages by eye.

That keeps the sheet readable for both individual records and the demographic snapshot. The labels explain each row, while the summary shows whether the segment mix needs attention.

Related Challenge to This Problem

  • Calculate Pass/Fail Grades
  • Calculate Category Discounts
  • Map Product Categories

How We Solve It

The logic comes from threshold checks. If the age is under 18, the result is Minor. If it is not under 18 but still under 65, the result is Adult. Otherwise, the result is Senior.

The challenge solution uses IFS, but nested IF works too. The important part is keeping the thresholds in the right order.

Method 1: Nested IF

Nested IF Illustration
Method 1: Use nested IF logic when the number of age groups is small.

This method checks the age step by step. First it tests for minor, and only if that fails does it move on to the next condition, which makes the cutoff order part of the formula.

It works well when the number of categories is limited and the threshold rules are straightforward. The downside is that nested formulas get harder to read as soon as more groups are added.

=IF(B2<18,"Minor",IF(B2<65,"Adult","Senior"))

Method 2: IFS Sequence

IFS Illustration
Method 2: Use IFS for the same logic in a cleaner sequence.

IFS expresses the same age rules in a cleaner order. Each condition is followed by the label it should return, so the formula reads like a short rule list.

That makes the formula easier to scan when you revisit the workbook later. The final TRUE() acts as the fallback, which catches anything that reaches the senior group after earlier checks fail.

=IFS(B2<18,"Minor",B2<65,"Adult",TRUE(),"Senior")

Method 3: Reference Table Lookup

Reference Table Illustration
Method 3: Use a reference table when the bracket rules need to stay editable.

If the age bands are likely to change, a reference table can be easier to maintain than hard-coded thresholds in every formula. The formula can look up the bracket from a small rule table instead of carrying the rules inside every row.

That setup is not required here, but it is a good next step when the categorization rules become more complex or need to be adjusted by someone who does not want to edit formulas.

=XLOOKUP(B2,$F$2:$F$4,$G$2:$G$4,"Unknown",-1)

Function Explanation

1. IF

IF tests one condition and returns one result for true and another for false. In this challenge, it can split ages into groups by checking one cutoff first, then moving to the next check if needed.

Once more than one threshold is involved, the formula can be nested to keep checking the next band. That works, but the nesting should stay simple enough that the cutoff logic remains readable.

Learn more this functionIF

2. IFS

IFS checks several conditions in order and returns the first matching label. That makes it a strong fit for age brackets because each threshold can be written as its own condition-label pair.

It is especially helpful when you want the threshold logic to stay readable instead of deeply nested. The formula becomes easier to review when the group order is visible from left to right.

Learn more this functionIFS

3. COUNTIF

COUNTIF counts cells that match a condition. In the summary area, it counts how many rows were labeled Minor or Senior.

That is what turns the row-by-row categorization into a simple demographic summary. Instead of counting raw ages manually, the sheet counts the labels created by the formula.

Learn more this functionCOUNTIF

Watch the cutoff values carefully. In this challenge, age 18 starts the Adult group, and age 65 starts the Senior group.

Try Yourself

Assign each customer to a market segment based on age, then use the summary area to count how many minors and seniors appear in the list. This gives you both the row-level segment labels and a quick demographic snapshot of the full customer set.

1
Objective #1
Cell: C2-C6

In Column C, assign a Market Segment using the following rules: under 18 is "Minor", 18 to 64 is "Adult", and 65 or older is "Senior".

2
Objective #2
Cell: B9

In cell B9, calculate the total number of "Minor" customers in your list.

3
Objective #3
Cell: B10

In cell B10, identify the total count of "Senior" customers in your database.

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

Let others know about this challenge!

Related Challenges
Analysis
#20
Highlight Weekend Shifts

An Excel shift schedule includes work dates, and you need to detect which rows fall on weekends before payroll is reviewed.

Easy
Analysis
#21
Calculate BMI (Index)

An Excel health tracker stores weight and height, and you need to calculate BMI and place each result into the right category.

Easy
Lookup
#22
Map Product Categories

An Excel product list uses short code prefixes, and you need to convert them into readable category names.

Easy
Forecasting
#23
Estimate Completion Time

An Excel task sheet has start dates and durations, and you need to calculate delivery dates without counting weekends.

Easy
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