{"text_format":"1","workbook":"xlsx","n_sheets":3,"sheets":["問題文＆解答","正答","読み込み＆書き込みシート"],"not_rendered":{"charts":0,"images":1,"macros":1,"external_links":0,"defined_names":0,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"問題文＆解答","index":0,"n_rows":10,"n_cols":4,"rows_kept":10,"cut":false,"hidden":false,"merged":[]}
[]
[]
[]
[]
[null,"問題文",null,"解答方法"]
[null,"以下の要件を満たすVBAの\nプログラムを実装して下さい。",null,"解答プログラムは\n「開発」\n→「Visual Basic」\n→「Answer」\n内のSub answer()に記載して下さい。"]
[]
[null,"要件"]
[null,"シート「読み込みシート」の日付（B列）の最下行を取得し, \n6行目から最下行までfor文でループして, 獲得金額を取得し, 貯金額を計算, 記入していく。"]
[null,"最後に, シート「読み込み＆書き込みシート」をアクティベートにして, MsgBox関数で「実行完了」と表示する。"]

{"sheet":"正答","index":1,"n_rows":7,"n_cols":2,"rows_kept":7,"cut":false,"hidden":false,"merged":[]}
[]
[]
[]
[]
[null,"正答プログラム例"]
[null,"Option Explicit\n\nSub correctAnswerExample()\n    Dim ws As Worksheet\n    Dim lastRow As Long\n    Dim row As Long\n    Dim earnedAmount As Long\n    Dim sum As Long\n    ' 「読み込み＆書き込みシート」を設定する\n    Set ws = ThisWorkbook.Sheets(\"読み込み＆書き込みシート\")\n    ' B列の最後の行を取得する\n    lastRow = ws.Cells(ws.Rows.Count, 2).End(xlUp).row\n    For row = 6 To lastRow\n        earnedAmount = ws.Cells(row, 3).Value\n        sum = sum + earnedAmount\n        ws.Cells(row, 4) = sum\n    Next row\n    '「読み込み＆書き込みシート」をアクティベートにする\n    ws.Activate\n    ' メッセージを表示する\n    MsgBox \"実行完了\"\nEnd Sub"]
[null,"↑上のプログラムは\n「開発」\n→「Visual Basic」\n→「CorrectAnswerExample」\nに記載してあります。"]

{"sheet":"読み込み＆書き込みシート","index":2,"n_rows":16,"n_cols":4,"rows_kept":16,"cut":false,"hidden":false,"merged":[]}
[]
[]
[]
[]
[null,"日付","獲得金額","貯金額"]
[null,"2024-01-01",1000]
[null,"2024-01-02",2000]
[null,"2024-01-03",3000]
[null,"2024-01-04",4000]
[null,"2024-01-05",5000]
[null,"2024-01-06",6000]
[null,"2024-01-07",7000]
[null,"2024-01-08",8000]
[null,"2024-01-09",9000]
[null,"2024-01-10",10000]
[null,null,null,"↑列「貯金額」の値を毎回, 消してから実行して, 正常に動作しているか確認して下さい！"]