ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA Macro Grade Curve Question (https://www.excelbanter.com/excel-programming/335818-vba-macro-grade-curve-question.html)

Nathan Bell

VBA Macro Grade Curve Question
 
All,

I am trying to come up with a VBA maco that someone may or may not know
of something that is in existance or can be created. I want to create a
macro that you can define the range, then have the function evaluate between
a score range and add x points to the grade . So say I want to add x points
(7 for example) between y and z score (say for example 50 and 60). Then have
the function evaluate each cell in the range between y and z and add 7
points to the raw score. XYZ and the range all need to be user definable. I
am still working on the problem and will post my progress as I work on it.
Any help would be greatly appreciated.

Regards,

Nathan



Tom Ogilvy

VBA Macro Grade Curve Question
 
Sub AdjustGrades()
Dim x as long, y as long, z as long
Dim cell as Range
x = 7
y = 50
z = 60

for each cell in selection
if cell.Value = y and cell.Value <= z then
cell.Value = cell.value + x
end if
Next
End Sub

--
Regards,
Tom Ogilvy
"Nathan Bell" wrote in message
...
All,

I am trying to come up with a VBA maco that someone may or may not

know
of something that is in existance or can be created. I want to create a
macro that you can define the range, then have the function evaluate

between
a score range and add x points to the grade . So say I want to add x

points
(7 for example) between y and z score (say for example 50 and 60). Then

have
the function evaluate each cell in the range between y and z and add 7
points to the raw score. XYZ and the range all need to be user definable.

I
am still working on the problem and will post my progress as I work on it.
Any help would be greatly appreciated.

Regards,

Nathan






All times are GMT +1. The time now is 02:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com