VBA Macro Grade Curve Question

N

Nathan Bell

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
 
T

Tom Ogilvy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top