{"text_format":"1","workbook":"xlsx","n_sheets":9,"sheets":["Úvod","Syntaxe","Do while","Do Until","WhileWend","Exit","Prakticky","Vlastní poznámky","testy"],"not_rendered":{"charts":0,"images":22,"macros":1,"external_links":0,"defined_names":2,"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":"Úvod","index":0,"n_rows":28,"n_cols":8,"rows_kept":28,"cut":false,"hidden":false,"merged":[[27,1,27,11],[1,2,1,9],[12,2,13,6],[15,3,16,6],[16,7,16,9]]}
[]
[null,null,"Jak na Excel "]
[]
[]
[null,null,null,"Obsah cvičení"]
[null,null,null,null,"Do Loop  Until"]
[null,null,null,null,"Do Loop  While"]
[null,null,null,null,"     +Exit Do"]
[null,null,null,null,"WhileWend"]
[]
[]
[]
[null,null,"Pavel Lasák"]
[]
[]
[null,null,null,"Lektor, expert na Microsoft Excel, držitel prestižního ocenění Microsoftu MVP v České republice"]
[null,null,null,null,null,null,null,5002722]
[]
[]
[]
[]
[null,null,null,"Další informace ke cvičení:"]
[null,null,null,null,"http://office.lasakovi.com/excel/vba-teorie-zaklady/do-loop-excel-vba/"]
[]
[]
[]
[]
[null,"Copyright, Pavel Lasák 2017  rev 2019, 2021"]

{"sheet":"Syntaxe","index":1,"n_rows":36,"n_cols":10,"rows_kept":36,"cut":false,"hidden":false,"merged":[[0,0,0,10],[1,0,1,10],[3,9,3,13],[4,9,4,13],[5,9,5,13]]}
["Do … Loop While  - Excel VBA"]
["http://office.lasakovi.com/"]
[]
[null,null,null,null,null,null,null,null,"Složka","03_VBA_Zaklady - Konstrukce"]
[null,"While - dokud je podmínka splněna",null,null,null,null,null,null,"Sešit","03m - VBA Zaklad - Do-loop-until-excel-VBA.xlsm"]
[null,"Until - dokud podmínka není splněna",null,null,null,null,null,null,"List","Syntaxe"]
[]
[null,"Syntaxe 1"]
[]
[null,"Do [{While | Until} podmínka]"]
[null,null,"[příkazy]"]
[null,null,null,"[Exit Do]"]
[null,null,"[příkazy]"]
[null,"Loop"]
[]
[null,"podmínka - Volitelné. Číselný výraz nebo řetězcový výraz, který je vyhodnocen jako True nebo False. Je-li podmínka Null, pak je vyhodnocena jako False."]
[null,"příkazy - Jeden nebo více příkazů, které jsou opakovány, dokud je nebo dokud není podmínka True."]
[]
[]
[null,"Syntaxe 2"]
[]
[null,"Do"]
[null,null,"[příkazy]"]
[null,null,null,"[Exit Do]"]
[null,null,"[příkazy]"]
[null,"Loop [{While | Until} podmínka]"]
[]
[null,"podmínka - Volitelné. Číselný výraz nebo řetězcový výraz, který je vyhodnocen jako True nebo False. Je-li podmínka Null, pak je vyhodnocena jako False."]
[null,"příkazy - Jeden nebo více příkazů, které jsou opakovány, dokud je nebo dokud není podmínka True."]
[]
[]
[null,"Syntaxe 3"]
[]
[null,"While podmínka"]
[null,null,"[příkazy]"]
[null,"Wend"]

{"sheet":"Do while","index":2,"n_rows":83,"n_cols":17,"rows_kept":83,"cut":false,"hidden":false,"merged":[[6,7,6,11],[7,7,7,11],[8,7,8,11],[0,0,0,10],[1,0,1,10],[3,6,3,9],[81,0,81,10],[82,0,83,6]]}
["Do … Loop While  - Excel VBA"]
["http://office.lasakovi.com/"]
["Prostor pro data"]
[null,null,null,null,null,null,"While"]
[null,null,null,null,null,null,"While - dokud je podmínka splněna"]
[]
[null,null,null,null,null,null,"Složka","03_VBA_Zaklady - Konstrukce"]
[null,null,null,null,null,null,"Sešit","03m - VBA Zaklad - Do-loop-until-excel-VBA.xlsm"]
[null,null,null,null,null,null,"List","Do while"]
[]
[]
[null,null,null,null,null,null,"Pro další testy smaže hotnoty"]
[]
[]
[]
[]
[]
["While 1 - podmínka na začátku",null,null,null,null,null,null,null,null,null,null,null,"While 2  - podmínka na konci"]
[]
[null,"Pocitadlo = 1",null,null,null,null,null,null,null,null,null,null,null,"Pocitadlo = 1"]
[null,"Do While Pocitadlo <= 10 ' Vnitřní smyčka.",null,null,null,null,null,null,null,null,null,null,null,"Do"]
[null,null,"' dokud je pravda provaděj",null,null,null,null,null,null,null,null,null,null,"    Cells(Pocitadlo + 4, 2) = Pocitadlo"]
[null,"    Cells(Pocitadlo + 4, 1) = Pocitadlo",null,null,null,null,null,null,null,null,null,null,null,"    Pocitadlo = Pocitadlo + 1   ' Zvyš počítadlo."]
[null,"    Pocitadlo = Pocitadlo + 1   ' Zvyš počítadlo.",null,null,null,null,null,null,null,null,null,null,null,null,"' zapíše a pak se teprve zkontroluje"]
[null,"Loop",null,null,null,null,null,null,null,null,null,null,null,"Loop While Pocitadlo <= 10 ' Vnitřní smyčka."]
[]
[]
[]
[null,"Tip pro další testování"]
[null,"1) Změnit v počitadle hodnotu na = 10 nebo na 11"]
[null,"2) změěnit znaménka"]
[null,"3) Zkontrolovat co bude v Pocitadle po dokončení skriptu"]
[]
[null,"MsgBox (\"Smyčka: \" &pocitadlo)",null,null,null,null,null,null,null,null,null,null,null,"MsgBox (\"Smyčka: \" &pocitadlo)"]
[null,"Debug.Print Pocitadlo",null,null,null,null,null,null,null,null,null,null,null,"Debug.Print Pocitadlo"]
[]
[]
[]
[]
[null,"Opustit?"]
[]
[null,"Exit Do"]
[]
[]
[null,"Pocitadlo = 1",null,null,null,null,null,null,null,null,null,null,null,"Pocitadlo = 1"]
[null,"Do While Pocitadlo < 10 ' Vnitřní smyčka.",null,null,null,null,null,null,null,null,null,null,null,"Do"]
[null,"    Cells(Pocitadlo + 4, 5) = Pocitadlo",null,null,null,null,null,null,null,null,null,null,null,"    Cells(Pocitadlo + 4, 5) = Pocitadlo"]
[null,"    Pocitadlo = Pocitadlo + 1   ' Zvyš počítadlo.",null,null,null,null,null,null,null,null,null,null,null,"    Pocitadlo = Pocitadlo + 1   ' Zvyš počítadlo."]
[null,null,null,"If Pocitadlo = 5 then",null,null,null,null,null,null,null,null,null,null,null,"If Pocitadlo = 5 then"]
[null,null,null,null,"Exit Do",null,null,null,null,null,null,null,null,null,null,null,"Exit Do"]
[null,null,null,null,"' Pokud 5 vyskočí, vloží proto jen čísla do 4",null,null,null,null,null,null,null,null,null,null,null,"' Pokud 5 vyskočí, vloží proto jen čísla do 4"]
[null,null,null,"End If",null,null,null,null,null,null,null,null,null,null,null,"End If"]
[null,"Loop ",null,null,null,null,null,null,null,null,null,null,null,"Loop While Pocitadlo < 10 ' Vnitřní smyčka."]
[]
[]
[]
[]
[]
[null,"Testy"]
[]
[]
[]
[]
[]
[]
["While 1",null,null,null,null,null,null,null,null,null,null,null,"While 2"]
[]
[null,"' Pozor u větší menší člověk nepostřehene rozdíl",null,null,null,null,null,null,null,null,null,null,null,"Pocitadlo = 1"]
[null,"Pocitadlo = 1",null,null,null,null,null,null,null,null,null,null,null,"Do"]
[null,"Do While Pocitadlo < 10 ' Vnitřní smyčka.",null,null,null,null,null,null,null,null,null,null,null,"    Cells(Pocitadlo + 4, 4) = Pocitadlo"]
[null,null,"' dokud je pravda provaděj",null,null,null,null,null,null,null,null,null,null,"    Pocitadlo = Pocitadlo + 1   ' Zvyš počítadlo."]
[null,"    Cells(Pocitadlo + 4, 3) = Pocitadlo",null,null,null,null,null,null,null,null,null,null,null,null,"' zapíše a pak se teprve zkontroluje"]
[null,"    Pocitadlo = Pocitadlo + 1   ' Zvyš počítadlo.",null,null,null,null,null,null,null,null,null,null,null,null,"' neboli zapíše 10 a pak zkontroluje prametr"]
[null,"Loop",null,null,null,null,null,null,null,null,null,null,null,"Loop While Pocitadlo < 10 ' Vnitřní smyčka."]
[]
[]
[]
[]
[]
[]
["Příklad k článku:"]
["http://office.lasakovi.com/excel/vba-teorie-zaklady/do-loop-excel-vba/"]
["Pavel Lasák 2015 rev 2021"]

{"sheet":"Do Until","index":3,"n_rows":82,"n_cols":20,"rows_kept":82,"cut":false,"hidden":false,"merged":[[6,6,6,10],[7,6,7,10],[8,6,8,10],[0,0,0,8],[1,0,1,8],[80,0,80,8],[81,0,82,5],[3,5,3,7]]}
["Do .. Loop  Until - Excel VBA",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"rr"]
["http://office.lasakovi.com/",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"rr","rr"]
[]
[null,null,null,null,null,"Until"]
[1,null,null,null,null,"Until - dokud podmínka není splněna"]
[2]
[3,null,null,null,null,"Složka","03_VBA_Zaklady - Konstrukce"]
[4,null,null,null,null,"Sešit","03m - VBA Zaklad - Do-loop-until-excel-VBA.xlsm"]
[5,null,null,null,null,"List","Do Until"]
[6]
[7]
[8]
[9]
[10]
[]
[]
[]
["Until 1",null,null,null,null,null,null,null,null,null,"Until 2"]
[]
[null,"Pocitadlo = 1",null,null,null,null,null,null,null,null,null,"Pocitadlo = 1"]
[null,"Do Until Pocitadlo >= 10 ' Vnitřní smyčka.",null,null,null,null,null,null,null,null,null,"Do"]
[null,"    Cells(Pocitadlo + 4, 1) = Pocitadlo",null,null,null,null,null,null,null,null,null,"    Cells(Pocitadlo + 4, 2) = Pocitadlo"]
[null,"    Pocitadlo = Pocitadlo + 1   ' Zvyš počítadlo.",null,null,null,null,null,null,null,null,null,"    Pocitadlo = Pocitadlo + 1   ' Zvyš počítadlo."]
[null,"   '' MsgBox (pocitadlo)",null,null,null,null,null,null,null,null,null,"Loop Until Pocitadlo >= 10 ' Vnitřní smyčka."]
[null,"Loop"]
[]
[]
[]
[null,"Do Until - na začátku - ",null,null,null,null,null,null,null,null,null,"Do Until - podmínka na konci"]
[]
[null,"' hrátky se sloupcem 12 (L)",null,null,null,null,null,null,null,null,null,"' Pro sloupec 13 M"]
[null,"Dim RadekCislo As Integer",null,null,null,null,null,null,null,null,null,"' Proběhne jednou i když není prázná !!!"]
[null,"                        ",null,null,null,null,null,null,null,null,null,"Dim RadekCislo As Integer"]
[null,"RadekCislo = 1",null,null,null,null,null,null,null,null,null,"    "]
[null,null,null,null,null,null,null,null,null,null,null,"RadekCislo = 1"]
[null,"Do Until Not IsEmpty(Cells(RadekCislo, 12))",null,null,null,null,null,null,null,null,null,"Do"]
[null,"    Cells(RadekCislo, 12).Interior.Color = RGB(200, 200, 200)",null,null,null,null,null,null,null,null,null,"    Cells(RadekCislo, 13).Interior.Color = RGB(200, 200, 200)"]
[null,"    RadekCislo = RadekCislo + 1",null,null,null,null,null,null,null,null,null,"    RadekCislo = RadekCislo + 1"]
[null,"Loop",null,null,null,null,null,null,null,null,null,"Loop Until Not IsEmpty(Cells(RadekCislo, 13))"]
[]
[]
["Exit Do"]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
["Until 3 --- znaménko!"]
[null,"Pocitadlo = 1"]
[null,"Do"]
[null,"    Cells(Pocitadlo + 4, 3) = Pocitadlo"]
[null,"    Pocitadlo = Pocitadlo + 1   ' Zvyš počítadlo."]
[null,"Loop Until Pocitadlo < 10 ' Vnitřní smyčka."]
[]
["Until 4"]
[null,"Pocitadlo = 1"]
[null,"   MsgBox (\"Před: \" & pocitadlo)",null,null,null,null,null,null,null,"dokud není není splněna"]
[null,"Do Until Pocitadlo < 10 ' Vnitřní smyčka."]
[null,"    Cells(Pocitadlo + 4, 4) = Pocitadlo"]
[null,"    Pocitadlo = Pocitadlo + 1   ' Zvyš počítadlo."]
[null,"   MsgBox (\"Smyčka: \" &pocitadlo)"]
[null,"Loop"]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
["Příklad k článku:"]
["http://office.lasakovi.com/excel/vba-teorie-zaklady/do-loop-excel-vba/"]
["Pavel Lasák 2015"]

{"sheet":"WhileWend","index":4,"n_rows":20,"n_cols":4,"rows_kept":20,"cut":false,"hidden":false,"merged":[[0,0,0,8],[1,0,1,8],[3,3,3,7],[4,3,4,7],[5,3,5,7]]}
["While Wend"]
["http://office.lasakovi.com/"]
[]
[null,null,"Složka","03_VBA_Zaklady - Konstrukce"]
[1,null,"Sešit","03m - VBA Zaklad - Do-loop-until-excel-VBA.xlsm"]
[2,null,"List","WhileWend"]
[3]
[4]
[5]
[6]
[7]
[8]
[9,null,"Pocitadlo = 1"]
[10,null,"While Pocitadlo <= 10 ' Vnitřní smyčka."]
[null,null,"    Cells(Pocitadlo + 4, 1) = Pocitadlo"]
[null,null,"    Pocitadlo = Pocitadlo + 1   ' Zvyš počítadlo."]
[null,null,"   '' MsgBox (pocitadlo)"]
[null,null,"Wend"]
[]
[null,null,"MsgBox Pocitadlo"]

{"sheet":"Exit","index":5,"n_rows":19,"n_cols":3,"rows_kept":19,"cut":false,"hidden":false,"merged":[[0,0,0,6],[1,0,1,6],[3,2,3,6],[4,2,4,6],[5,2,5,6]]}
["Do … Loop While  s Exit Do - Excel VBA"]
["http://office.lasakovi.com/"]
[]
[null,"Složka","03_VBA_Zaklady - Konstrukce"]
[null,"Sešit","03m - VBA Zaklad - Do-loop-until-excel-VBA.xlsm"]
[null,"List","Exit"]
[]
[null,"Exit Do"]
[]
[null,null,"Pocitadlo = 1"]
[null,null,"' Pozor na zacyklení Do bez podmínky"]
[null,null,"Do"]
[null,null,"    Cells(Pocitadlo + 4, 1) = Pocitadlo"]
[null,null,"    Pocitadlo = Pocitadlo + 1   ' Zvyš počítadlo."]
[null,null,"    If Pocitadlo > 5 Then"]
[null,null,"       Exit Do"]
[null,null,"    End If"]
[null,null,"   '' MsgBox (pocitadlo)"]
[null,null,"Loop"]

{"sheet":"Prakticky","index":6,"n_rows":46,"n_cols":3,"rows_kept":46,"cut":false,"hidden":false,"merged":[]}
["2021-08-01"]
["2021-08-02"]
["2021-08-03",null,"Sečíst hodnoty 1 až 11 využitím Do Loop"]
["2021-08-04"]
["2021-08-05"]
["2021-08-06",null,"Dim i As Integer"]
["2021-08-07",null,"Dim Soucet As Integer"]
["2021-08-08",null,"i = 1"]
["2021-08-09",null,"Do While i <= 11"]
["2021-08-10",null,"  Soucet = Soucet + i"]
["2021-08-11",null,"  i = i + 1"]
["2021-08-12",null,"Loop"]
["2021-08-13",null,"MsgBox (Soucet)"]
["2021-08-14"]
["2021-08-15"]
["2021-08-16"]
["2021-08-17",null,"Řada dnů vybraného měsíce"]
["2021-08-18"]
["2021-08-19",null,"Dim KonkretniDatum As Date"]
["2021-08-20",null,"Dim i As Integer"]
["2021-08-21",null,"Dim Mesic As Integer"]
["2021-08-22",null,"Dim Rok As Integer"]
["2021-08-23",null,"Rok = 2021"]
["2021-08-24",null,"Mesic = 8"]
["2021-08-25",null,"i = 0"]
["2021-08-26",null,"KonkretniDatum = DateSerial(Rok, Mesic, 1)"]
["2021-08-27",null,"Do While Month(KonkretniDatum) = Month(Date)"]
["2021-08-28",null,"    Range(\"A1\").Offset(i, 0) = KonkretniDatum"]
["2021-08-29",null,"    i = i + 1"]
["2021-08-30",null,"    KonkretniDatum = KonkretniDatum + 1"]
["2021-08-31",null,"Loop"]
[]
[]
[]
[null,null,"Řada dnů vybraného měsíce"]
[null,null,"Využitím Until"]
[]
[null,null,"Dim CMDate As Date"]
[null,null,"Dim i As Integer"]
[null,null,"i = 0"]
[null,null,"CMDate = DateSerial(Year(Date), Month(Date), 1)"]
[null,null,"Do Until Month(CMDate) <> Month(Date)"]
[null,null,"Range(\"A1\").Offset(i, 0) = CMDate"]
[null,null,"i = i + 1"]
[null,null,"CMDate = CMDate + 1"]
[null,null,"Loop"]

{"sheet":"Vlastní poznámky","index":7,"n_rows":4,"n_cols":2,"rows_kept":4,"cut":false,"hidden":false,"merged":[[0,0,0,8],[1,0,1,8]]}
["Do .. Loop - Excel VBA"]
["http://office.lasakovi.com/"]
[]
[null,"Pro vlastní kódy a poznámky"]

{"sheet":"testy","index":8,"n_rows":18,"n_cols":4,"rows_kept":18,"cut":false,"hidden":false,"merged":[]}
["Excel 1"]
["Excel 2"]
["Excel 3"]
["Excel 4"]
["Excel 5"]
["Excel 6"]
["Excel 7"]
["Excel 8",null,null,"' Zápis do buněk"]
["Excel 9",null,null,"' -------------------------------"]
["Excel 10",null,null,"Dim n As Integer"]
["Excel 11",null,null,"n = 0"]
[]
[null,null,null,"Do While n < 11"]
[null,null,null,"    n = n + 1"]
[null,null,null,"    Range(\"A\" & n).Value = \"Excel \" & n"]
[null,null,null,"Loop"]
[]
["konec"]