このようなテスト得点のデータを処理。
落第点のセルを赤く表示するには Sub 落第点表示()
Dim i As Integer
Dim j As Integer
Dim thre As Double
thre = 50
For i = 3 To 7
For j = 3 To 5
If (Cells(i, j).Value < thre) Then
Cells(i, j).Select
With Selection.Interior
.Color = 255
End With
End If
Next j
Next i
MsgBox "生徒得点のうち" & thre & "点以下を赤で示しました."
End Sub
Sub 色分け初期化()
Range("C3 : E7").Select
With Selection.Interior
.Color = RGB(255, 235, 255)
End With
End Sub