{"id":2138,"date":"2023-09-29T01:34:04","date_gmt":"2023-09-29T01:34:04","guid":{"rendered":"https:\/\/exceladvisor.org\/tr\/yuva-eger\/"},"modified":"2023-12-10T06:07:57","modified_gmt":"2023-12-10T06:07:57","slug":"yuva-eger","status":"publish","type":"page","link":"https:\/\/exceladvisor.org\/tr\/yuva-eger\/","title":{"rendered":"Vba&#39;n\u0131n i\u00e7 i\u00e7e if i\u015flevi nas\u0131l kullan\u0131l\u0131r?"},"content":{"rendered":"<div class=\"excel-icerikten-once\" id=\"excel-2282217911\"><script type=\"text\/javascript\">\r\n\tatOptions = {\r\n\t\t'key' : 'c1158f160081d6540a8409e6925dab94',\r\n\t\t'format' : 'iframe',\r\n\t\t'height' : 250,\r\n\t\t'width' : 300,\r\n\t\t'params' : {}\r\n\t};\r\n<\/script>\r\n<script type=\"text\/javascript\" src=\"\/\/www.highperformanceformat.com\/c1158f160081d6540a8409e6925dab94\/invoke.js\"><\/script><\/div> <p>VBA&#8217;da, i\u00e7 i\u00e7e IF&#8217;ler olu\u015fturmak i\u00e7in bir <a href=\"https:\/\/exceladvisor.org\/tr\/eger-2\/\">IF ifadesini<\/a> ba\u015fka bir IF ifadesinin i\u00e7inde kullanabilirsiniz. Basit bir ifadeyle, ba\u015fka bir IF ifadesinin sonucuna dayal\u0131 olarak IF kullanarak bir test ifadesini \u00e7al\u0131\u015ft\u0131rabilirsiniz. Bu t\u00fcr ko\u015fullu ifadelerde karma\u015f\u0131k ko\u015fullar\u0131 test etmeniz gerekir. Bir \u00f6rnek g\u00f6relim: <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-57650\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-vba-imbrique-si.png\" sizes=\"auto, \" srcset=\"\" alt=\"vba-yuvalanm\u0131\u015f-if\" width=\"388\" height=\"438\"><\/figure><\/div><p> Yukar\u0131daki \u00f6rnekte iki ko\u015fulu test ediyoruz; ko\u015ful1 (1 + 1 = 2) ve ko\u015ful2 (2 + 2 = 4).<\/p><p> Ancak biz IF ifadesinin i\u00e7indeki IF ifadesi oldu\u011fumuz i\u00e7in, VBA \u00f6nce ilk ko\u015fulu test edecek ve ard\u0131ndan bir sonraki IF&#8217;ye ge\u00e7ecektir.<\/p><p> \u0130kinci IF&#8217;de ko\u015fulun DO\u011eRU olup olmad\u0131\u011f\u0131n\u0131 g\u00f6steren bir <a href=\"https:\/\/exceladvisor.org\/tr\/vba-mesaj-kutusu\/\">mesaj kutumuz<\/a> var.<\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Sub myMacro1() 'first if statement If 1 + 1 = 2 Then 'second if statement If 2 + 2 = 4 Then MsgBox True End If Else MsgBox False End If End Sub<\/code><\/pre><p> Burada birden fazla IF&#8217;yi tek bir IF&#8217;de kullanman\u0131n bir \u00f6rne\u011fi verilmi\u015ftir. <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-57651\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/2-exemple-pour-utiliser-plusieurs-ifs-dans-un-if.png\" sizes=\"auto, \" srcset=\"\" alt=\"\" width=\"562\" height=\"613\"><\/figure><\/div><p> Daha \u00f6nce kulland\u0131\u011f\u0131m\u0131z \u00f6rnekle yukar\u0131daki \u00f6rnek aras\u0131nda bir fark var: Bu kodda &#8220;Else&#8221; i\u00e7in i\u00e7 i\u00e7e ko\u015ful kulland\u0131k.<\/p><p> \u0130lk ko\u015ful do\u011fru de\u011filse VBA &#8220;Ba\u015fka&#8221;ya atlayacak ve ko\u015fulu test edecektir, e\u011fer bu ko\u015ful do\u011fru de\u011filse bir sonrakine ge\u00e7ecektir.<\/p><p> Bu \u015fekilde test etmek i\u00e7in toplam d\u00f6rt ko\u015fulumuz var.<\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Sub myMacro2() Dim myScore As Single: myScore = Range(\"A1\").Value If myScore &gt;= 80 Then MsgBox \"Excellent\" Else If myScore &gt;= 60 And myScore &lt; 80 Then MsgBox \"Good\" Else If myScore &gt;= 40 And myScore &lt; 60 Then MsgBox \"Average\" Else If myScore &lt; 40 Then MsgBox \"Poor\" End If End If End If End If End Sub<\/code><\/pre><p> Bu i\u00e7 i\u00e7e ge\u00e7mi\u015f IF ifadesi, A1 h\u00fccresinin puan\u0131n\u0131 test edecek ve buna g\u00f6re bir mesaj kutusu g\u00f6r\u00fcnt\u00fcleyecektir.<\/p><h2 class=\"wp-block-heading\"> VBA i\u00e7 i\u00e7e ge\u00e7mi\u015f birden fazla sat\u0131ra sahip IF (IF)<\/h2><p> Her iki sonucu da (Do\u011fru ve Yanl\u0131\u015f) \u00e7al\u0131\u015ft\u0131rmak i\u00e7in iki farkl\u0131 IF kullanabilirsiniz. <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-57652\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/3-vba-imbrique-si-avec-plusieurs-lignes.png\" sizes=\"auto, \" srcset=\"\" alt=\"\" width=\"638\" height=\"473\"><\/figure><\/div><p> Yukar\u0131daki \u00f6rnekte g\u00f6rd\u00fc\u011f\u00fcn\u00fcz gibi \u00f6ncelikle test edecek bir ko\u015fulumuz var ve e\u011fer bu ko\u015ful DO\u011eRU ise, o zaman test edecek ba\u015fka bir ko\u015fulumuz var ve e\u011fer bu ikinci ko\u015ful DO\u011eRU ise bir mesaj kutusu alacaks\u0131n\u0131z.<\/p><p> Ve e\u011fer ana ko\u015ful yanl\u0131\u015fsa, test etmeniz gereken ba\u015fka bir ko\u015ful vard\u0131r ve bu ko\u015fulun do\u011fru olmas\u0131 durumunda bir mesaj kutusu al\u0131rs\u0131n\u0131z.<\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Sub myMacro3() If 1 + 1 = 2 Then If 2 - 1 = 1 Then MsgBox \"Condition1 is TRUE.\" End If Else If 3 - 2 = 1 Then MsgBox \"Condition2 is TRUE.\" End If End If End Sub<\/code><\/pre><div class=\"gb-container gb-container-4db6181c gb-container-mt\"> <a class=\"gb-button gb-button-c5897111 gb-button-text gb-button-mt-button\" href=\"https:\/\/exceladvisor.org\/tr\/vba\/\">VBA nedir<\/a><h2 class=\"gb-headline gb-headline-665e5f6b gb-headline-text gb-headline-mt-heading\"> \u0130lgili e\u011fitimler <\/h2><div class=\"gb-grid-wrapper gb-grid-wrapper-a20baf7c gb-grid-wrapper-mt-grid\"><div class=\"gb-grid-column gb-grid-column-65ddf67e\"><div class=\"gb-container gb-container-65ddf67e\"><ul><li> <a href=\"https:\/\/exceladvisor.org\/tr\/eger-disari-cik\/\">VBA \u00c7\u0131k\u0131\u015f\u0131 IF<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/tr\/eger-2\/\">VBA IF (IF o zaman de\u011filse)<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/tr\/eger-ve\/\">VBA IF ve<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/tr\/aksi-takdirde\/\">HAYIR \u0130SE VBA<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/tr\/eger-veya\/\">VBA IF VEYA<\/a> <\/li><\/ul><\/div><\/div><div class=\"gb-grid-column gb-grid-column-50067b57\"><div class=\"gb-container gb-container-50067b57\"><\/div><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"ub_ctt_via":"","footnotes":""},"class_list":["post-2138","page","type-page","status-publish","hentry"],"featured_image_src":null,"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u25b7 VBA&#039;n\u0131n i\u00e7 i\u00e7e IF i\u015flevi nas\u0131l kullan\u0131l\u0131r?<\/title>\n<meta name=\"description\" content=\"i\u00e7 i\u00e7e IF&#039;ler (yani birden fazla IF ifadesi) olu\u015fturmak i\u00e7in ba\u015fka bir IF ifadesinin i\u00e7inde bir IF ifadesini kullanabilirsiniz\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/exceladvisor.org\/tr\/yuva-eger\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u25b7 VBA&#039;n\u0131n i\u00e7 i\u00e7e IF i\u015flevi nas\u0131l kullan\u0131l\u0131r?\" \/>\n<meta property=\"og:description\" content=\"i\u00e7 i\u00e7e IF&#039;ler (yani birden fazla IF ifadesi) olu\u015fturmak i\u00e7in ba\u015fka bir IF ifadesinin i\u00e7inde bir IF ifadesini kullanabilirsiniz\" \/>\n<meta property=\"og:url\" content=\"https:\/\/exceladvisor.org\/tr\/yuva-eger\/\" \/>\n<meta property=\"og:site_name\" content=\"Excel Advisor\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-10T06:07:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-vba-imbrique-si.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/exceladvisor.org\/tr\/yuva-eger\/\",\"url\":\"https:\/\/exceladvisor.org\/tr\/yuva-eger\/\",\"name\":\"\u25b7 VBA&#39;n\u0131n i\u00e7 i\u00e7e IF i\u015flevi nas\u0131l kullan\u0131l\u0131r?\",\"isPartOf\":{\"@id\":\"https:\/\/exceladvisor.org\/tr\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/exceladvisor.org\/tr\/yuva-eger\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/exceladvisor.org\/tr\/yuva-eger\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-vba-imbrique-si.png\",\"datePublished\":\"2023-09-29T01:34:04+00:00\",\"dateModified\":\"2023-12-10T06:07:57+00:00\",\"description\":\"i\u00e7 i\u00e7e IF&#39;ler (yani birden fazla IF ifadesi) olu\u015fturmak i\u00e7in ba\u015fka bir IF ifadesinin i\u00e7inde bir IF ifadesini kullanabilirsiniz\",\"breadcrumb\":{\"@id\":\"https:\/\/exceladvisor.org\/tr\/yuva-eger\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/exceladvisor.org\/tr\/yuva-eger\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/exceladvisor.org\/tr\/yuva-eger\/#primaryimage\",\"url\":\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-vba-imbrique-si.png\",\"contentUrl\":\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-vba-imbrique-si.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/exceladvisor.org\/tr\/yuva-eger\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Ev\",\"item\":\"https:\/\/exceladvisor.org\/tr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vba&#39;n\u0131n i\u00e7 i\u00e7e if i\u015flevi nas\u0131l kullan\u0131l\u0131r?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/exceladvisor.org\/tr\/#website\",\"url\":\"https:\/\/exceladvisor.org\/tr\/\",\"name\":\"Excel Advisor\",\"description\":\"Veri hakimiyetine y\u00f6nelik nihai rehberiniz!\",\"publisher\":{\"@id\":\"https:\/\/exceladvisor.org\/tr\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/exceladvisor.org\/tr\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/exceladvisor.org\/tr\/#organization\",\"name\":\"Excel Advisor\",\"url\":\"https:\/\/exceladvisor.org\/tr\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/exceladvisor.org\/tr\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/exceladvisor.org\/tr\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png\",\"contentUrl\":\"https:\/\/exceladvisor.org\/tr\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png\",\"width\":105,\"height\":36,\"caption\":\"Excel Advisor\"},\"image\":{\"@id\":\"https:\/\/exceladvisor.org\/tr\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u25b7 VBA&#39;n\u0131n i\u00e7 i\u00e7e IF i\u015flevi nas\u0131l kullan\u0131l\u0131r?","description":"i\u00e7 i\u00e7e IF&#39;ler (yani birden fazla IF ifadesi) olu\u015fturmak i\u00e7in ba\u015fka bir IF ifadesinin i\u00e7inde bir IF ifadesini kullanabilirsiniz","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/exceladvisor.org\/tr\/yuva-eger\/","og_locale":"tr_TR","og_type":"article","og_title":"\u25b7 VBA&#39;n\u0131n i\u00e7 i\u00e7e IF i\u015flevi nas\u0131l kullan\u0131l\u0131r?","og_description":"i\u00e7 i\u00e7e IF&#39;ler (yani birden fazla IF ifadesi) olu\u015fturmak i\u00e7in ba\u015fka bir IF ifadesinin i\u00e7inde bir IF ifadesini kullanabilirsiniz","og_url":"https:\/\/exceladvisor.org\/tr\/yuva-eger\/","og_site_name":"Excel Advisor","article_modified_time":"2023-12-10T06:07:57+00:00","og_image":[{"url":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-vba-imbrique-si.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Tahmini okuma s\u00fcresi":"2 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/exceladvisor.org\/tr\/yuva-eger\/","url":"https:\/\/exceladvisor.org\/tr\/yuva-eger\/","name":"\u25b7 VBA&#39;n\u0131n i\u00e7 i\u00e7e IF i\u015flevi nas\u0131l kullan\u0131l\u0131r?","isPartOf":{"@id":"https:\/\/exceladvisor.org\/tr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/exceladvisor.org\/tr\/yuva-eger\/#primaryimage"},"image":{"@id":"https:\/\/exceladvisor.org\/tr\/yuva-eger\/#primaryimage"},"thumbnailUrl":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-vba-imbrique-si.png","datePublished":"2023-09-29T01:34:04+00:00","dateModified":"2023-12-10T06:07:57+00:00","description":"i\u00e7 i\u00e7e IF&#39;ler (yani birden fazla IF ifadesi) olu\u015fturmak i\u00e7in ba\u015fka bir IF ifadesinin i\u00e7inde bir IF ifadesini kullanabilirsiniz","breadcrumb":{"@id":"https:\/\/exceladvisor.org\/tr\/yuva-eger\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/exceladvisor.org\/tr\/yuva-eger\/"]}]},{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/exceladvisor.org\/tr\/yuva-eger\/#primaryimage","url":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-vba-imbrique-si.png","contentUrl":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-vba-imbrique-si.png"},{"@type":"BreadcrumbList","@id":"https:\/\/exceladvisor.org\/tr\/yuva-eger\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Ev","item":"https:\/\/exceladvisor.org\/tr\/"},{"@type":"ListItem","position":2,"name":"Vba&#39;n\u0131n i\u00e7 i\u00e7e if i\u015flevi nas\u0131l kullan\u0131l\u0131r?"}]},{"@type":"WebSite","@id":"https:\/\/exceladvisor.org\/tr\/#website","url":"https:\/\/exceladvisor.org\/tr\/","name":"Excel Advisor","description":"Veri hakimiyetine y\u00f6nelik nihai rehberiniz!","publisher":{"@id":"https:\/\/exceladvisor.org\/tr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/exceladvisor.org\/tr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":"Organization","@id":"https:\/\/exceladvisor.org\/tr\/#organization","name":"Excel Advisor","url":"https:\/\/exceladvisor.org\/tr\/","logo":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/exceladvisor.org\/tr\/#\/schema\/logo\/image\/","url":"https:\/\/exceladvisor.org\/tr\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png","contentUrl":"https:\/\/exceladvisor.org\/tr\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png","width":105,"height":36,"caption":"Excel Advisor"},"image":{"@id":"https:\/\/exceladvisor.org\/tr\/#\/schema\/logo\/image\/"}}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/exceladvisor.org\/tr\/wp-json\/wp\/v2\/pages\/2138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exceladvisor.org\/tr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/exceladvisor.org\/tr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/exceladvisor.org\/tr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exceladvisor.org\/tr\/wp-json\/wp\/v2\/comments?post=2138"}],"version-history":[{"count":1,"href":"https:\/\/exceladvisor.org\/tr\/wp-json\/wp\/v2\/pages\/2138\/revisions"}],"predecessor-version":[{"id":2961,"href":"https:\/\/exceladvisor.org\/tr\/wp-json\/wp\/v2\/pages\/2138\/revisions\/2961"}],"wp:attachment":[{"href":"https:\/\/exceladvisor.org\/tr\/wp-json\/wp\/v2\/media?parent=2138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}