Question
CalculateAverage macro: ? This macro uses a loop to produce the average scores in column O. ? The macro should also produce the column header.
CalculateAverage macro:
? This macro uses a loop to produce the average scores in column O.
? The macro should also produce the column header. The header should be left justified.
? All numbers should have two decimal places. If a number has zero or one digit after the decimal point, pad the number with additional zero(s) so that it has two digits after the decimal points.
? Your macro should still work if the data is expanded. (In other words, dont hard-code the data range.)
? If you would like a template, you might want to start with the following one:
Sub CalculateAve rage() 17 18 19 20 21 Dim rng As Range Set rng Cells (1, 1).CurrentRegion xxx Create the header ***Replace xxxxxxxxxx with a valid value so that 23 24 25 ? 26 27 28 29 LNext 30 End Sub ' ***the loop iterates enough times for the data. For 1 = 2 To XXXXXXXXXX ***Calculate average for the ith row Format the valueStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
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