whats wrong in this coding? : <p>Whats wrong in this coding ? it is working in single cell but not in multiple cells</p>

<pre><code>Private Sub CommandButton1_Click()
Dim marks As Integer, result As String
marks = range("B2:B7")
If marks &gt;= 33 Then
result = "pass"
Else
result = "fail"
End If
range("C2:C7").Value = result
End Sub
</code></pre>
