ご質問の趣旨がよく分からないのですが、H4から各行までの平均値を算出し各行で判定させてみました。
ご質問の趣旨と違えていればスルーください。
参考までに平均値をF列に算出させています。
Sub 平均値算出()
Dim cellgyo As Long
Dim myCnt As Long
Dim mySum As Single
myCnt = 0
mySum = 0
For cellgyo = 4 To 23
If Cells(cellgyo, \u0026quot;H\u0026quot;).Value \u0026lt;\u0026gt; \u0026quot;\u0026quot; Then
myCnt = myCnt + 1
mySum = mySum + Cells(cellgyo, \u0026quot;H\u0026quot;).Value
'平均値参考
Cells(cellgyo, \u0026quot;F\u0026quot;).Value = mySum / myCnt
If mySum / myCnt \u0026lt; 60 Then
Cells(cellgyo, \u0026quot;G\u0026quot;).Value = \u0026quot;不合格\u0026quot;
Else
Cells(cellgyo, \u0026quot;G\u0026quot;).Value = \u0026quot;\u0026quot;
End If
Else
If myCnt \u0026lt;\u0026gt; 0 Then
'平均値参考
Cells(cellgyo, \u0026quot;F\u0026quot;).Value = mySum / myCnt
If mySum / myCnt \u0026lt; 60 Then
Cells(cellgyo, \u0026quot;G\u0026quot;).Value = \u0026quot;不合格\u0026quot;
Else
Cells(cellgyo, \u0026quot;G\u0026quot;).Value = \u0026quot;\u0026quot;
End If
End If
End If
Next
End Sub