Skip to content

Instantly share code, notes, and snippets.

@jakelosh
Created August 23, 2019 23:37
Show Gist options
  • Save jakelosh/62aeb237ff2c2bf783c6b964bb6f3d31 to your computer and use it in GitHub Desktop.
Save jakelosh/62aeb237ff2c2bf783c6b964bb6f3d31 to your computer and use it in GitHub Desktop.
VBA implementation of FizzBuzz
Public Sub FizzBuzz()
For i = 1 to 100
result = ""
If (i mod 3) = 0 Then result = result & "Fizz"
If (i mod 5) = 0 Then result = result & "Buzz"
If result = "" result = str(i)
Debug.Print (result)
Next i
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment