練習問題/解答例/星座を求めるプログラム/Excel VBA
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[練習問題]]
Sub 星座()
Dim stars As Variant
Dim days As Variant
Dim month As Integer
Dim day As Integer
Dim i As String
stars = Array("山羊", "水瓶", "魚", "牡羊", "牡牛", "双...
days = Array(20, 18, 20, 20, 21, 21, 22, 22, 23, 23, 22,...
month = Range("A1").Value
day = Range("A2").Value
If day <= days(month - 1) Then
i = stars(month - 1)
Else
i = stars(month)
End If
Range("A3").Value = month & "月" & day & "日の星座は" & ...
End Sub
終了行:
[[練習問題]]
Sub 星座()
Dim stars As Variant
Dim days As Variant
Dim month As Integer
Dim day As Integer
Dim i As String
stars = Array("山羊", "水瓶", "魚", "牡羊", "牡牛", "双...
days = Array(20, 18, 20, 20, 21, 21, 22, 22, 23, 23, 22,...
month = Range("A1").Value
day = Range("A2").Value
If day <= days(month - 1) Then
i = stars(month - 1)
Else
i = stars(month)
End If
Range("A3").Value = month & "月" & day & "日の星座は" & ...
End Sub
ページ名: