Attribute VB_Name = "testif2" Sub テスト() Dim x As Integer Dim y As Integer x = 12 y = 8 If x > 10 Then Range("A1").Value = "変数xは10より大きい" Else Range("A1").Value = "変数xは10より小さい" End If If y > 10 Then Range("A2").Value = "変数yは10より大きい" Else Range("A2").Value = "変数yは10より小さい" End If End Sub