Tackle 2024 with new knowledge – take advantage of Learnesys’ fall campaign on the All Courses package. Read more here.

# Excel challenge – FizzBuzz

The rules are simple:

• Count up from zero.
• If the current number is a multiple of 3, say “Fizz” instead of the number
• If it’s a multiple of 5, say “Buzz”
• If it’s a multiple of both 3 and 5 say, “Fizzbuzz”

Write a formula for column C that plays the game of Fizzbuzz on the number sequence in column B.

*A multiple is a number that may be divided by another a certain number of times without a remainder

#### One thought on “Excel challenge – FizzBuzz”

1. Jeffrey Johns says:

First attempt, with IF-statements:
=IF(AND(MOD(B3;3)=0;MOD(B3;5)=0);”Fizzbuzz”;IF(MOD(B3;3)=0;”Fizz”;IF(MOD(B3;5)=0;”Buzz”;B3)))

Out of curiosity without IF-statements (and by chance a fascinating discovery (for me) of the mathematical approach – google “Euler’s fizzbuzz”)
=SWITCH(MOD(B3^4;15);1;B3;6;”Fizz”;10;”Buzz”;0;”Fizzbuzz”)

### More blog posts Tired of Googling? 