{"text_format":"1","workbook":"xlsx","n_sheets":9,"sheets":["README","01_Basic","02_Step","03_Reverse","04_ExitFor","05_Nested","06_ForEachRange","07_Array","08_RealWorld"],"not_rendered":{"charts":0,"images":0,"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":"README","index":0,"n_rows":14,"n_cols":1,"rows_kept":14,"cut":false,"hidden":false,"merged":[]}
["VBA For Loop in Excel - Companion Workbook"]
[]
[]
["How to use:"]
["  1. Press Alt+F11 to open the VBA editor and read the 8 examples in module 'Examples'."]
["  2. Click any sheet (01_Basic, 02_Step, ...) to see the example's starting state."]
["  3. Press F5 in the VBA editor on any Sub (Example01_Basic ... Example08_RealWorld) to run it."]
["  4. Compare the result with the screenshot in the article 鈥?they will match exactly."]
[]
["Article:    https://excelmaster.ai/blog/vba/vba-for-loop"]
["Tested on:  Excel 365 v2509, Excel 2021, Excel 2019"]
[]
["Tip: when 200 lines of VBA gets too painful to maintain, try ExcelMaster Agent at"]
["     https://excelmaster.ai 鈥?same job, plain English."]

{"sheet":"01_Basic","index":1,"n_rows":1,"n_cols":3,"rows_kept":1,"cut":false,"hidden":false,"merged":[]}
[null,null,"(Run Example01_Basic to fill column A with 10, 20, ... 100)"]

{"sheet":"02_Step","index":2,"n_rows":1,"n_cols":3,"rows_kept":1,"cut":false,"hidden":false,"merged":[]}
[null,null,"(Run Example02_Step to fill A1, A3, ... A19 with \"Row N\")"]

{"sheet":"03_Reverse","index":3,"n_rows":10,"n_cols":2,"rows_kept":10,"cut":false,"hidden":false,"merged":[]}
["Item 1","KEEP"]
["Item 2","KEEP"]
["Item 3","DELETE"]
["Item 4","KEEP"]
["Item 5","KEEP"]
["Item 6","DELETE"]
["Item 7","KEEP"]
["Item 8","KEEP"]
["Item 9","DELETE"]
["Item 10","KEEP"]

{"sheet":"04_ExitFor","index":4,"n_rows":20,"n_cols":1,"rows_kept":20,"cut":false,"hidden":false,"merged":[]}
["DATA"]
["DATA"]
["DATA"]
["DATA"]
["DATA"]
["DATA"]
["STOP"]
["DATA"]
["DATA"]
["DATA"]
["DATA"]
["DATA"]
["DATA"]
["DATA"]
["DATA"]
["DATA"]
["DATA"]
["DATA"]
["DATA"]
["DATA"]

{"sheet":"05_Nested","index":5,"n_rows":1,"n_cols":6,"rows_kept":1,"cut":false,"hidden":false,"merged":[]}
[null,null,null,null,null,"(Run Example05_Nested to fill A1:D6 with multiplication table)"]

{"sheet":"06_ForEachRange","index":6,"n_rows":11,"n_cols":4,"rows_kept":11,"cut":false,"hidden":false,"merged":[]}
["Region","Revenue",null,"Total"]
["NA",120000]
["EMEA",89000]
["APAC",145000]
["LATAM",67000]
["OCE",33000]
["MENA",91000]
["CIS",22000]
["SA-East",56000]
["CA-West",78000]
["AF-N",102000]

{"sheet":"07_Array","index":7,"n_rows":1,"n_cols":3,"rows_kept":1,"cut":false,"hidden":false,"merged":[]}
[null,null,"(Run Example07_ForEachArray to fill A1:A4 with names)"]

{"sheet":"08_RealWorld","index":8,"n_rows":13,"n_cols":6,"rows_kept":13,"cut":false,"hidden":false,"merged":[]}
["Date","Region","Product","Amount",null,"(Filtered: Amount > 200,000)"]
["2026-04-01","NA","Widget A",145000]
["2026-04-03","EMEA","Widget B",287000]
["2026-04-05","APAC","Widget A",92000]
["2026-04-08","NA","Widget C",312000]
["2026-04-12","EMEA","Widget A",178000]
["2026-04-15","APAC","Widget B",421000]
["2026-04-18","LATAM","Widget C",56000]
["2026-04-22","NA","Widget B",234000]
["2026-04-25","EMEA","Widget C",198000]
["2026-04-28","APAC","Widget A",367000]
["2026-04-30","NA","Widget A",89000]
["2026-05-02","EMEA","Widget B",256000]