¥»©«³Ì«á¥Ñ john2006168 ©ó 2010-10-7 23:40 ½s¿è
test john.zip (11.46 KB)
Sub testexjohn()
Dim intscore As Integer
For i = 2 To 31
intscore = Cells(i, 3)
If intscore < 15 Then
Cells(i, 4) = "Poor"
ElseIf intscore < 50 Then
Cells(i, 4) = "Fail"
ElseIf intscore < 85 Then
Cells(i, 4) = "Pass"
ElseIf intscore <= 100 Then
Cells(i, 4) = "Very Good"
End If
Cells(i, 2) = i
Cells(i, 2) = UCase(Left(Cells(i, 1), 1)) & LCase(Right(Cells(i, 1), Len(Cells(i, 1)) - 1))
Next
End Sub |