你可以參考以下程式:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Target.Value < 5 Then
Me.Rows(1).Cells(2).Value = "bad"
ElseIf Target.Value > 10 Then
Me.Rows(1).Cells(2).Value = "good"
Else
Me.Rows(1).Cells(2).Value = "normal"
End If
End If
End Sub