VBA基本 Lesson8
問題と実行結果 Lesson8
問題1
Sub Lesson8_1()
    Dim i As Long
    For i = 2 To 21
        If Cells(i, "B") = "男" Then
            Cells(i, "D") = Cells(i, "C") - Range("G1")
        End If
        If Cells(i, "B") = "女" Then
            Cells(i, "D") = Cells(i, "C") - Range("G2")
        End If
    Next i
End Sub
※使用している内容は、「Office TANAKA」VBA Basic セミナー受講資料から許可を得て引用しております。
田中先生ありがとうございます。

