A macro called FifteenFizzBuzz which calculates the first fifteen elements of the FizzBuzz sequence and inserts the strings for them into cells D7:D21 of the
A macro called FifteenFizzBuzz which calculates the first fifteen elements of the FizzBuzz sequence and inserts the strings for them into cells D7:D21 of the current worksheet.
Hint: You can start by recording a Macro to put the string for 2 in cell D8. When I do that, the resut of the recording includes:
Sub Macro5() Range("D8").Select ActiveCell.FormulaR1C1 = "2" End Sub
From there, the steps are to a) put this code in a loop, b) change the cell reference on each pass through loop, replacing "D8" with something like "D" & 8, and c) replacing the "2" with something like SingleFizzBuzz(2).
Unit Test: After running this in the qFizzBuzz sheet, column D should show the capitalized strings corresponding to column C.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started