The Student
New Member
- Joined
- Sep 27, 2018
- Messages
- 24
- Office Version
- 365
- Platform
- Windows
I found this script and i now wonder how to make it work in more than one row. i tried to add Range("A1:A10"). but it gives me a run time-error 13 . Hope you can help.
Sub test()
Dim score1 As Integer, score2 As Integer, result As String
score1 = Range("A1").Value
score2 = Range("B1").Value
If score1 >= 60 And score2 > 1 Then
result = "pass"
Else
result = "fail"
End If
Range("C1").Value = result
End sub()
Sub test()
Dim score1 As Integer, score2 As Integer, result As String
score1 = Range("A1").Value
score2 = Range("B1").Value
If score1 >= 60 And score2 > 1 Then
result = "pass"
Else
result = "fail"
End If
Range("C1").Value = result
End sub()