Attribute VB_Name = "testif4" Sub テスト() Dim x As Integer x = 9 If x > 0 Then Dim amari As Integer amari = x Mod 2 If amari = 0 Then Range("A1").Value = "値は正の偶数です" Else Range("A1").Value = "値は正の奇数です" End If Else Range("A1").Value = "値は負の数です" End If End Sub