The Problem
In this guide, we will explore exactly how to categorize ages into buckets in Excel. A raw list of ages is useful, but it is much easier to analyze once each age is grouped into a simple segment.
That matters when the sheet needs to answer business questions quickly. You usually do not want to scan every number manually just to figure out how many minors or seniors are in the list.
In this challenge, the goal is to assign each customer to one of three groups: Minor, Adult, or Senior. After that, the summary section counts how many people fall into the minor and senior 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
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.
It works well when the number of categories is limited and the threshold rules are straightforward.
=IF(B2<18,"Minor",IF(B2<65,"Adult","Senior"))
Method 2: IFS Sequence
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.
That makes the formula easier to scan when you revisit the workbook later.
=IFS(B2<18,"Minor",B2<65,"Adult",TRUE,"Senior")
Method 3: Reference Table Lookup
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.
That setup is not required here, but it is a good next step when the categorization rules become more complex.
=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 is used to split ages into groups based on threshold checks.
Once more than one threshold is involved, the formula can be nested to keep checking the next band.
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.
It is especially helpful when you want the threshold logic to stay readable instead of deeply nested.
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.
Watch the cutoff values carefully. In this challenge, age 18 starts the Adult group, and age 65 starts the Senior group.
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.