Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

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 value

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions