練習問題
Sub 干支() Dim zodiac As Variant Dim years As Integer Dim i As Integer zodiac = Array("申""酉""戌""亥""子""丑""寅""卯""辰""巳""午""未") years = Range("A1").Value i = years Mod 12 Range("A2").Value = "西暦" & years & "年の干支は" & zodiac(i) & "です" End Sub