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.
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.
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, 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
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
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.
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.