{"text_format":"1","workbook":"xlsx","n_sheets":11,"sheets":["Úvod","Syntaxe","Case Select - základ","Case - MsgBox","Case Select - základ řešení","Case Select -více","Case Select - rozsah textu","Case Select s Like","Case Select - ukázky","Úkol","Prostor pro poznámky"],"not_rendered":{"charts":0,"images":25,"macros":1,"external_links":0,"defined_names":3,"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":29,"n_cols":8,"rows_kept":29,"cut":false,"hidden":false,"merged":[[28,1,28,11],[1,2,1,9],[14,2,15,6],[17,3,18,6],[18,7,18,9]]}
[]
[null,null,"Jak na Excel "]
[]
[]
[null,null,null,"Obsah cvičení"]
[null,null,null,null,"Case syntaxe"]
[null,null,null,null,"Case základ","Řešení"]
[null,null,null,null,"Case více podmínek"]
[null,null,null,null,"Case s Like"]
[null,null,null,null,"Case ukázky - hrátky"]
[null,null,null,null,"Úkol"]
[]
[]
[]
[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,"https://office.lasakovi.com/excel/vba-teorie-zaklady/select-case-excel-vba/"]
[null,null,null,null,"https://office.lasakovi.com/excel/vba-teorie-zaklady/Operator-Like-Excel-VBA/"]
[]
[]
[]
[null,"Copyright, Pavel Lasák 2017  rev 2019, 2020, 2021"]

{"sheet":"Syntaxe","index":1,"n_rows":23,"n_cols":4,"rows_kept":23,"cut":false,"hidden":false,"merged":[[0,0,0,4],[1,0,1,4],[3,1,3,2],[4,1,4,2],[5,1,5,2]]}
["Case Select - Excel VBA"]
["http://office.lasakovi.com/"]
[]
[null,"03_VBA_Zaklady - Konstrukce",null,"Složka"]
[null,"03c - VBA Zaklad Case-select-excel-VBA.xlsm",null,"Sešit"]
[null,"Syntax",null,"List"]
[]
[]
[null,"Provádí jeden příkazů z několika v závislosti na hodnotě výrazu."]
[]
[]
[null,"Select Case testovaný_výraz \n     [Case seznam_výrazů-n [příkazy-n]] \n[Case Else \n    [elsepříkazy]] \nEnd Select "]
[]
[]
[null,"Popis argumentu"]
[null,"testovaný_výraz - Povinné. Libovolný číselný výraz nebo řetězcový výraz."]
[null,"seznam_výrazů-nPovinné, vyskytne-li se Case. Oddělený seznam položek v následujícím formátu:"]
[null,"výraz"]
[null,"výraz To výraz - Klíčové slovo To určuje rozsah hodnot. Menší hodnota musí být uvedena před To."]
[null,"Is výraz s operátory_porovnání - Klíčové slovo Is s operátory porovnání (kromě Is a Like) lze použít pro určení rozsahu hodnot."]
[null,"kombinace výše uvedených - odděleno čárkou"]
[null,"příkazy-n - Volitelné. Jeden nebo více příkazů vykonaných, jestliže testovaný_výraz odpovídá libovolné části ze seznamu_příkazů-n."]
[null,"elsepříkazy - Volitelné. Jeden nebo více příkazů vykonaných, jestliže testovaný_výraz neodpovídá žádné klauzuli z Case."]

{"sheet":"Case Select - základ","index":2,"n_rows":54,"n_cols":6,"rows_kept":54,"cut":false,"hidden":false,"merged":[[0,0,0,4],[1,0,1,4],[3,1,3,2],[4,1,4,2],[5,1,5,2]]}
["Case Select - Excel VBA"]
["http://office.lasakovi.com/"]
[]
["Složka","03_VBA_Zaklady - Konstrukce"]
["Sešit","03c - VBA Zaklad Case-select-excel-VBA.xlsm"]
["List","Case Select - základ"]
[]
[null,"Odpoveď na ANO - NE",null,null,null,"Jak vypadá s IF … Then?"]
[]
[null,null,null,null,null," Prostor pro porovnání"]
[null,"i = MsgBox(\"Chcete větši plat?\", vbYesNo, \"Plat\")  ",null,null,null,"i = MsgBox(\"Chcete větši plat?\", vbYesNo, \"Plat\")  "]
[null,"' vyhodnocení odpovědi    ",null,null,null,"    If i = vbYes Then"]
[null," Select Case i",null,null,null,"                MsgBox \"Jsi žena.\""]
[null,"     Case vbNo",null,null,null,"    Else"]
[null,"            MsgBox (\"Vaše odpověď NE.\")",null,null,null,"              MsgBox \"Jsi muž.\""]
[null,"     Case vbYes",null,null,null,"    End If"]
[null,"            MsgBox (\"Vaše odpověď ANO.\")"]
[null,"End Select"]
[]
[]
[null,"Porovnání dvou hodnot",null,null,null,"Porovnání dvou hodnot do Debug Print"]
[]
[]
[null,"a = InputBox(\"Zadej číslo 1:\")",null,null,null,"a = InputBox(\"Zadej číslo 1:\")"]
[null,"b = InputBox(\"Zadej číslo 2:\")",null,null,null,"b = InputBox(\"Zadej číslo 2:\")"]
[]
[null,"Select Case a = b",null,null,null,"Select Case a = b"]
[null,"Case True",null,null,null,"Case True"]
[null,"  MsgBox \"Zadány dvě stejné hodnoty.\"",null,null,null,"  Debug.Print \"Zadány dvě stejné hodnoty.\""]
[null,"Case False",null,null,null,"Case False"]
[null,"  MsgBox \"Zadány různé hodnoty.\"",null,null,null,"  Debug.Print \"Zadány různé hodnoty.\""]
[null,"End Select",null,null,null,"End Select"]
[]
[]
[]
[null,"Je hodnota větší než …"]
[]
[]
[null,"a = InputBox(\"Zadej číslo 1:\")"]
[null,"b = InputBox(\"Zadej číslo 2:\")"]
[]
[null,"Select Case a > b"]
[null,"Case True"]
[null,"  MsgBox \"Zadány dvě stejné hodnoty.\""]
[null,"Case False"]
[null,"  MsgBox \"Zadány různé hodnoty.\""]
[null,"End Select"]
[]
[]
[null,"Tip "]
[null,"Porovnání s If … Then …. Else … End If"]
[]
[null,"Úkol"]
[null,"Přepiště pomocí If Then"]

{"sheet":"Case - MsgBox","index":3,"n_rows":19,"n_cols":2,"rows_kept":19,"cut":false,"hidden":false,"merged":[[0,0,0,3],[1,0,1,3]]}
["Case Select - Excel VBA"]
["http://office.lasakovi.com/"]
[]
[]
[]
[]
[null," '' Ukázka dialogového boxu jiná tlačítka"]
[null,"    Dim Odpoved As VbMsgBoxResult"]
[null,"    '' Viz deklarace proměných"]
[null,"    Odpoved = MsgBox(\"Něco stiskni!\", vbYesNoCancel)"]
[null,"    "]
[null,"    Select Case Odpoved"]
[null,"        Case vbYes"]
[null,"            MsgBox (\"Klikl jsi na Ano - Yes\")"]
[null,"        Case vbNo"]
[null,"            MsgBox (\"Klikl jsi na Nbe - No\")"]
[null,"        Case vbCancel"]
[null,"            MsgBox (\"Klikl jsi na Zrušit - Cancel\")"]
[null,"    End Select"]

{"sheet":"Case Select - základ řešení","index":4,"n_rows":43,"n_cols":6,"rows_kept":43,"cut":false,"hidden":true,"merged":[[0,0,0,4],[1,0,1,4],[3,1,3,2],[4,1,4,2],[5,1,5,2]]}
["Case Select - Excel VBA"]
["http://office.lasakovi.com/"]
[]
["Složka","03_VBA_Zaklady - Konstrukce"]
["Sešit","03c - VBA Zaklad Case-select-excel-VBA.xlsm"]
["List","Syntax"]
[]
[]
[null,"Porovnání dvou hodnot"]
[]
[]
[null,"a = InputBox(\"Zadej číslo 1:\")"]
[null,"b = InputBox(\"Zadej číslo 2:\")"]
[]
[null,"Select Case a = b"]
[null,"Case True"]
[null,"  MsgBox \"Zadány dvě stejné hodnoty.\""]
[null,"Case False"]
[null,"  MsgBox \"Zadány různé hodnoty.\""]
[null,"End Select"]
[]
[]
[]
[null,"Je hodnota větší než …",null,null,null,"Tip "]
[null,null,null,null,null,"Porovnání s If … Then …. Else … End If"]
[]
[null,"a = InputBox(\"Zadej číslo 1:\")"]
[null,"b = InputBox(\"Zadej číslo 2:\")"]
[]
[null,"Select Case a > b"]
[null,"Case True"]
[null,"  MsgBox \"Zadány dvě stejné hodnoty.\""]
[null,"Case False"]
[null,"  MsgBox \"Zadány různé hodnoty.\""]
[null,"End Select"]
[]
[null,"' Co se stane pokud nezadate čísla?"]
[]
[]
[]
[]
[null,"Úkol"]
[null,"Přepiště pomocí If Then"]

{"sheet":"Case Select -více","index":5,"n_rows":69,"n_cols":8,"rows_kept":69,"cut":false,"hidden":false,"merged":[[0,0,0,4],[1,0,1,4],[3,2,3,3],[4,2,4,3],[5,2,5,3]]}
["Case Select - Excel VBA"]
["http://office.lasakovi.com/"]
[]
[null,"Složka","03_VBA_Zaklady - Konstrukce"]
[null,"Sešit","03c - VBA Zaklad Case-select-excel-VBA.xlsm"]
[null,"List","Case Select -více"]
[]
[null,"Ohodnocení bodu za známku:"]
[]
[null,50,"<<< Body za test - číslo 0 až 100"]
[]
[null,"Dim body As Integer"]
[null,"Dim vysledek As String"]
[null,"' Načtení hodnoty z buňky viz dále"]
[null,"body = Range(\"B10\").Value"]
[]
[null,"Select Case body"]
[null,"    Case Is >= 90"]
[null,"        vysledek = \"A - velice super\""]
[null,"    Case Is >= 80"]
[null,"        vysledek = \"B - super\""]
[null,"    Case Is >= 60"]
[null,"        vysledek = \"C - nic moc\""]
[null,"    Case Else"]
[null,"        vysledek = \"E - špatné\""]
[null,"End Select"]
[]
[]
[]
[]
[]
[null,"Ovoce a zelenina … Výčet prvku v Case Select",null,null,null,null,null,"Jak budete řešit využitím if Then? Použijete OR?"]
[]
[]
[null,"Hodnota = InputBox(\"Zadej ovoce, zelenina:\")"]
[null,"' rozhodnutí co bylo zadáno - ovoce, zelenina"]
[null,"Select Case Hodnota"]
[null,"Case \"Jablko\", \"Hruška\", \"Banan\", \"Jahoda\""]
[null,"  MsgBox \"Jde o ovoce ...\""]
[null,"Case \"Mrkev\", \"Petržel\", \"zelí\""]
[null,"  MsgBox \"Jde o zeleninu ...\""]
[null,"Case Else"]
[null,"  MsgBox \"Nemůžu rozhodnout.\""]
[null,"End Select"]
[]
[]
[]
[]
[null,"Více"]
[null,"… Regulární výrazy"]
[null,"později …"]
[]
[]
[]
[null,"'' Jako funkce"]
[null,"Public Function AssignGrade(studentScore As Single) As String"]
[null,"Select Case studentScore"]
[null,"Case 90 To 100"]
[null,"AssignGrade = “A”"]
[null,"Case Is >= 80"]
[null,"AssignGrade = “B”"]
[null,"Case 70 To 80"]
[null,"AssignGrade = “C”"]
[null,"Case Is >= 60"]
[null,"AssignGrade = “D”"]
[null,"Case Else"]
[null,"AssignGrade = “F”"]
[null,"End Select"]
[null,"End Function"]

{"sheet":"Case Select - rozsah textu","index":6,"n_rows":71,"n_cols":3,"rows_kept":71,"cut":false,"hidden":false,"merged":[[0,0,0,4],[1,0,1,4],[3,2,3,3],[4,2,4,3],[5,2,5,3]]}
["Case Select - Excel VBA"]
["http://office.lasakovi.com/"]
[]
[null,"Složka","03_VBA_Zaklady - Konstrukce"]
[null,"Sešit","03c - VBA Zaklad Case-select-excel-VBA.xlsm"]
[null,"List","Case Select - rozsah textu"]
[]
[]
[null,"Rozsah textu pro ukázku"]
[]
[null,"' Ukázka pro rozsah textu"]
[null,"Hodnota = InputBox(\"Zadej text:\")"]
[null,"Select Case Hodnota"]
[]
[null,"      Case \"aa\" To \"dd\""]
[null,"                 MsgBox \"Text: aa - dd\""]
[null,"      Case Else"]
[null,"                 MsgBox \"ostatní text\""]
[null,"End Select"]
[]
[]
[]
[]
[]
[]
[null,"' Předpoklad umím načítat z buňky"]
[null,"Select Case Range(\"B20\").Text"]
[]
[null,"Case \"aa\" To \"dd\""]
[null,"    MsgBox \"aa - dd\""]
[null,"Case Else"]
[null,"    MsgBox \"ostatní\""]
[null,"End Select"]
[]
[]
[]
[]
[]
[null,"'' Ostestujte změnu čísla"]
[null,"Hodnota = 10"]
[]
[null,"Select Case Hodnota"]
[]
[null,"Case Is >= 8, Is <= 12"]
[null,"    MsgBox (\"Od 8 do 12\")"]
[null,"Case Else"]
[null,"    MsgBox (\"Ostatní\")"]
[null,"End Select"]
[]
[]
[]
[]
[]
[null,"' Podobně jako předchozí ukázka"]
[]
[null,"'' Ostestujte změnu čísla"]
[null,"Hodnota = 10"]
[]
[null,"Select Case Hodnota"]
[]
[null,"Case Is < 8, Is > 12"]
[null,"    MsgBox (\"Ostatní\")"]
[null,"Case Else"]
[null,"    MsgBox (\"Od 8 do 12\")"]
[null,"End Select"]
[]
[]
[]
[null,"Více"]
[null,"… Regulární výrazy"]
[null,"později …"]

{"sheet":"Case Select s Like","index":7,"n_rows":25,"n_cols":2,"rows_kept":25,"cut":false,"hidden":false,"merged":[[0,0,0,2],[1,0,1,2]]}
["Case Select - Excel VBA"]
["http://office.lasakovi.com/"]
[]
[]
[null,"Pouze jako ukázka pokud někdo má rád Like"]
[]
[]
[null,"slovo = \"JakNaExcel\""]
[null,"Select Case True"]
[null,"    Case slovo Like \"*Na*\""]
[null,"        MsgBox \"Nalezeno\""]
[null,"    Case Else"]
[null,"        MsgBox \"Nenelezeno\""]
[null,"End Select"]
[null,"' výsledek nalezeno"]
[]
[]
[null,"slovo = \"JakNaExcel\""]
[null,"Select Case True"]
[null,"    Case slovo Like \"*Naa*\""]
[null,"        MsgBox \"Nalezeno\""]
[null,"    Case Else"]
[null,"        MsgBox \"Nenelezeno\""]
[null,"End Select"]
[null,"' výsledek nenalezeno"]

{"sheet":"Case Select - ukázky","index":8,"n_rows":25,"n_cols":2,"rows_kept":25,"cut":false,"hidden":false,"merged":[[0,0,0,7],[1,0,1,7],[23,0,23,7],[24,0,25,3],[14,1,14,2],[15,1,15,2],[19,1,19,2],[20,0,20,7],[18,1,18,2],[8,0,9,3],[3,0,3,3]]}
["Case Select - Excel VBA"]
["http://office.lasakovi.com/"]
[]
["Reakce na tlačítko"]
[]
[]
[]
[]
["zadej jméno ovoce / zeleniny"]
[]
[]
[]
[]
[]
[null,"zadej číslo 1 - 100"]
[null,10]
[]
[]
[null,"zadej text"]
[null,"azzzzT"]
["A < B < E < Z < a < b < e < z"]
[]
["Příklad k článku:"]
["http://office.lasakovi.com/excel/vba-teorie-zaklady/select-case-excel-vba/"]
["Pavel Lasák 2015"]

{"sheet":"Úkol","index":9,"n_rows":29,"n_cols":3,"rows_kept":29,"cut":false,"hidden":false,"merged":[[0,0,0,7],[1,0,1,7]]}
["Case Select - Excel VBA"]
["http://office.lasakovi.com/"]
[]
[]
[null,"Úkol 1"]
[null,"Máte k dispozici oddělení HR, PR, GR, TH, EC"]
[]
[null,"Do InputBoxu zadáte hodnotu a vypíše dle výběru MsgBoxem"]
[null,"HR","personální"]
[null,"PR","tiskové"]
[null,"GR","ředitelství"]
[null,"TH","ostatní"]
[null,"EC","ostatní"]
[null,"MH","ostatní"]
[null,"*","neexistuje"]
[]
[]
[null,"Až budete umět zapisovat do buněk využijte tabulky k vyřešení"]
[]
[]
[null,"Úkol 2"]
[]
[null,"Jak vyřešíte pomocí If then? "]
[null,"Tip: Využít Or"]
[]
[null,"banán","ovoce"]
[null,"hruška","ovoce"]
[null,"mrkev","zelenina"]
[null,"zelí","zelenina"]

{"sheet":"Prostor pro poznámky","index":10,"n_rows":5,"n_cols":2,"rows_kept":5,"cut":false,"hidden":false,"merged":[[0,0,0,7],[1,0,1,7]]}
["Case Select - Excel VBA"]
["http://office.lasakovi.com/"]
[]
[]
[null,"Prostor pro vaše poznámky"]