- Nov 13, 2025
Excel FizzBuzz Challenge
- Neale Blackwood
- Dynamic Arrays, Formulas
- 0 comments
Sign up to hear about free Excel training.
I won't share your email with anyone.
Reading time: 2 mins
The Challenge
Create a list of the numbers from 1 to 100 inclusive.
If a number is evenly divisible by 3 display the text Fizz.
If a number is evenly divisible by 5 display the text Buzz.
If a number is evenly divisible by 3 and 5 display the text FizzBuzz.
If the number is not evenly divisible by 3 or 5 display the number.
The Excel Solution
The list of 100 numbers is created using.
=SEQUENCE(100)My formula to display the correct text is.
=LET(n,A1#,f,IF(MOD(n,3),"","Fizz"),b,IF(MOD(n,5),"","Buzz"),IF(f&b="",n,f&b))The image below shows the top of the sheet.
The MOD function returns the remainder after dividing one number by another.
When you use the MOD result as the logical test in an IF function it works like this.
If MOD returns zero (it means it is evenly divisible) then the result is treated as FALSE.
All other MOD results return TRUE because they are a number and all non-zero numbers are treated as TRUE.
If both f and b are blank, then the number is displayed. All other results show the combined text of f&b.
There is no doubt a simpler way to display this but this is my best attempt.
