Code:
Private Sub CommandButton21_Click()
Dim marks As Range
Dim bFail As Boolean
Dim n As Integer
Set marks = Range(Cells(1, 2), Cells(4, 2))
For n = 1 To marks.Rows.Count
If marks.Cells(n, 2) < 50 Then
bFail = True
Exit For
End If
Next n
If bFail Then
Range("B6") = "Fail"
Else
Range("B6") = "Pass"
End If
End Sub
Hi GMayor!!
I Tried this one for Range B1 to B4 but Failed!!