StudentID Average Curve 2304639 74.43% 2313287 67.49% 2321056 84.61% 2322978 74.
ID: 3626239 • Letter: S
Question
StudentID Average Curve2304639 74.43%
2313287 67.49%
2321056 84.61%
2322978 74.69%
2323977 89.31%
Create a macro that calculates the curve:
If the average score is greater than 79, then no curve is needed. If the average score is less than 79, then add a value to each individual score to increase the average to 79.
**The first two columns are given (StudentID and Average). We need a macro for a third column (Curve) and it should be displayed next to each value, depending on the average of each student.
Explanation / Answer
Put the values in Sheet1 of the Excel Workbook Sub StudentCurve() Dim rc,rc1 as Double rc = Sheet1.UsedRange.Rows.Count For rc1=2 to rc step 1 If Sheet1.Cells(rc1,2) < 0.79 Then Sheet1.Cells(rc1,3) = 0.79 - Sheet1.Cells(rc1,2) Else Sheet1.Cells(rc1,3) = 0 End If Sheet1.Cells(rc1,3).NumberFormat = "0.00%" Next MsgBox "Macro Completed" End SubRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.