Plastik808
New Member
- Joined
- Aug 15, 2011
- Messages
- 11
Hi Everyone...i am new to VBA and am stuck on a problem. I am trying to expand the following so i can have say 10 people having taken a test and require the code to tell me if they pass or fail. I have tried using score = Range("A1:A10").Value, but i got an error
Private Sub CommandButton1_Click()
Dim score As Integer, grade As String
score = Range("A1").Value
If score >= 60 Then
grade = "passed"
Else
grade = "failed"
End If
Range("B1").Value = grade
End Sub
Many thanks
Private Sub CommandButton1_Click()
Dim score As Integer, grade As String
score = Range("A1").Value
If score >= 60 Then
grade = "passed"
Else
grade = "failed"
End If
Range("B1").Value = grade
End Sub
Many thanks