Private Sub CommandButton1_Click()
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
In VBA, the above is an example of using the: