{"id":1966,"date":"2023-10-26T09:48:07","date_gmt":"2023-10-26T09:48:07","guid":{"rendered":"https:\/\/exceladvisor.org\/nl\/formaat\/"},"modified":"2023-12-06T05:46:06","modified_gmt":"2023-12-06T05:46:06","slug":"formaat","status":"publish","type":"page","link":"https:\/\/exceladvisor.org\/nl\/formaat\/","title":{"rendered":"Hoe gebruik ik de vba format-functie?"},"content":{"rendered":"<div class=\"excel-voor-de-inhoud\" id=\"excel-1984548115\"><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 class=\"content-box-grey\">De VBA FORMAT-functie wordt vermeld in de tekstcategorie van VBA-functies. Wanneer u het in VBA-code gebruikt, <strong>retourneert het een waarde<\/strong> die is opgemaakt in de door u opgegeven indeling. Simpel gezegd: u kunt het gebruiken om een expressie op te maken in een indeling die u zelf kunt opgeven. Er is \u00e9\u00e9n ding dat u hier moet opmerken: het resultaat dat het retourneert is het stringgegevenstype.<\/p><h2 class=\"wp-block-heading\"> Syntaxis<\/h2><p> <strong>Format(Expressie,[Formaat],[EersteDagWeek],[EersteWeekJaar])<\/strong><\/p><h2 class=\"wp-block-heading\"> Argumenten<\/h2><ul><li> <strong>Expressie<\/strong> : de expressie die u wilt opmaken.<\/li><li> <strong>[Formaat]<\/strong> : het formaat dat u op de uitdrukking wilt toepassen [Dit is een optioneel argument en als dit wordt weggelaten, neemt VBA standaard Algemeen aan].<\/li><li> <strong>[FirstDayOfWeek]<\/strong> : een tekenreeks om de eerste dag van de week te defini\u00ebren [Dit is een optioneel argument en als het standaard wordt weggelaten vbSunday].<ul><li> vbUseSystemDayOfWeek \u2013 Afhankelijk van systeeminstellingen.<\/li><li> vbzondag \u2013 zondag<\/li><li> vblunday \u2013 maandag<\/li><li> vbdinsdag \u2013 dinsdag<\/li><li> vbwoensdag \u2013 woensdag<\/li><li> vbDonderdag \u2013 Donderdag<\/li><li> vbVrijdag \u2013 vrijdag<\/li><li> vbzaterdag \u2013 zaterdag<\/li><\/ul><\/li><li> <strong>[FirstWeekOfYear]<\/strong> : een tekenreeks om de eerste week van het jaar te defini\u00ebren [Dit is een optioneel argument en als het standaard wordt weggelaten vbFirstJan1].<ul><li> vbSystem \u2013 Afhankelijk van systeeminstellingen.<\/li><li> vbFirstJan1 \u2013 De week waarin de 1e dag van januari valt.<\/li><li> vbFirstFourDays \u2013 De eerste week die minimaal vier dagen in het nieuwe jaar bevat.<\/li><li> vbFirstFullWeek \u2013 De eerste volledige week van het nieuwe jaar.<\/li><\/ul><\/li><\/ul><h2 class=\"wp-block-heading\"> Voorbeeld<\/h2><p> Om praktisch te begrijpen hoe u de VBA FORMAT-functie kunt gebruiken, moet u het onderstaande voorbeeld doorlopen waarin we er een vba-code mee hebben geschreven: <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" title=\"voorbeeld-functie-vba-formaat\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/exemple-de-fonction-de-format-vba.png\" sizes=\"auto, \" srcset=\"\" alt=\"example-vba-format-function\" width=\"824\" height=\"423\"><\/figure><\/div><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Sub example_FORMAT() Range(\"B1\").Value = Format(Range(\"A1\"), \"Currency\") Range(\"B2\").Value = Format(Range(\"A2\"), \"Long Date\") Range(\"B3\").Value = Format(Range(\"A3\"), \"True\/False\") End Sub<\/code><\/pre><p> In het bovenstaande voorbeeld hebben we FORMAT gebruikt met drie verschillende vooraf gedefinieerde formaten:<\/p><ol><li> De waarde van cel A1 converteren naar valutanotatie.<\/li><li> De datum in cel A2 converteren naar een lange datum.<\/li><li> Het getal in cel A3 converteren naar Booleaanse waarde.<\/li><\/ol><h2 class=\"wp-block-heading\"> Opmerkingen<\/h2><ul><li> U kunt ook uw eigen formaat maken om te gebruiken in het argument &#8220;formaat&#8221;. <\/li><\/ul><div class=\"wp-block-group more-tutorials is-layout-flow\"><div class=\"wp-block-group__inner-container\"><h2 class=\"wp-block-heading\"> Meer tutorials <\/h2><div class=\"wp-block-columns is-layout-flex wp-container-272\"><div class=\"wp-block-column is-layout-flow\"><ul><li> <a href=\"https:\/\/exceladvisor.org\/nl\/rechts\/\">RECHTS VBA<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/nl\/rtrim\/\">VBA RTRIM<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/nl\/ruimte\/\">VBA-RUIMTE<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/nl\/strcomp\/\">VBA STRCOMP<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/nl\/strconv\/\">VBA STRCONV<\/a><\/li><\/ul><\/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-1966","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>Hoe gebruik ik de VBA FORMAT-functie? (Syntaxis + voorbeeld)<\/title>\n<meta name=\"description\" content=\"Leer hoe u de VBA FORMAT-functie gebruikt met syntaxis, argumenten en voorbeelden met voorbeeldcode.\" \/>\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\/nl\/formaat\/\" \/>\n<meta property=\"og:locale\" content=\"nl_NL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hoe gebruik ik de VBA FORMAT-functie? (Syntaxis + voorbeeld)\" \/>\n<meta property=\"og:description\" content=\"Leer hoe u de VBA FORMAT-functie gebruikt met syntaxis, argumenten en voorbeelden met voorbeeldcode.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/exceladvisor.org\/nl\/formaat\/\" \/>\n<meta property=\"og:site_name\" content=\"Excel Advisor\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-06T05:46:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/exemple-de-fonction-de-format-vba.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Geschatte leestijd\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/exceladvisor.org\/nl\/formaat\/\",\"url\":\"https:\/\/exceladvisor.org\/nl\/formaat\/\",\"name\":\"Hoe gebruik ik de VBA FORMAT-functie? (Syntaxis + voorbeeld)\",\"isPartOf\":{\"@id\":\"https:\/\/exceladvisor.org\/nl\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/exceladvisor.org\/nl\/formaat\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/exceladvisor.org\/nl\/formaat\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/exemple-de-fonction-de-format-vba.png\",\"datePublished\":\"2023-10-26T09:48:07+00:00\",\"dateModified\":\"2023-12-06T05:46:06+00:00\",\"description\":\"Leer hoe u de VBA FORMAT-functie gebruikt met syntaxis, argumenten en voorbeelden met voorbeeldcode.\",\"breadcrumb\":{\"@id\":\"https:\/\/exceladvisor.org\/nl\/formaat\/#breadcrumb\"},\"inLanguage\":\"nl-NL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/exceladvisor.org\/nl\/formaat\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"nl-NL\",\"@id\":\"https:\/\/exceladvisor.org\/nl\/formaat\/#primaryimage\",\"url\":\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/exemple-de-fonction-de-format-vba.png\",\"contentUrl\":\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/exemple-de-fonction-de-format-vba.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/exceladvisor.org\/nl\/formaat\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/exceladvisor.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hoe gebruik ik de vba format-functie?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/exceladvisor.org\/nl\/#website\",\"url\":\"https:\/\/exceladvisor.org\/nl\/\",\"name\":\"Excel Advisor\",\"description\":\"Uw gids voor datadominantie\",\"publisher\":{\"@id\":\"https:\/\/exceladvisor.org\/nl\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/exceladvisor.org\/nl\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"nl-NL\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/exceladvisor.org\/nl\/#organization\",\"name\":\"Excel Advisor\",\"url\":\"https:\/\/exceladvisor.org\/nl\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"nl-NL\",\"@id\":\"https:\/\/exceladvisor.org\/nl\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/exceladvisor.org\/nl\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png\",\"contentUrl\":\"https:\/\/exceladvisor.org\/nl\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png\",\"width\":105,\"height\":36,\"caption\":\"Excel Advisor\"},\"image\":{\"@id\":\"https:\/\/exceladvisor.org\/nl\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hoe gebruik ik de VBA FORMAT-functie? (Syntaxis + voorbeeld)","description":"Leer hoe u de VBA FORMAT-functie gebruikt met syntaxis, argumenten en voorbeelden met voorbeeldcode.","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\/nl\/formaat\/","og_locale":"nl_NL","og_type":"article","og_title":"Hoe gebruik ik de VBA FORMAT-functie? (Syntaxis + voorbeeld)","og_description":"Leer hoe u de VBA FORMAT-functie gebruikt met syntaxis, argumenten en voorbeelden met voorbeeldcode.","og_url":"https:\/\/exceladvisor.org\/nl\/formaat\/","og_site_name":"Excel Advisor","article_modified_time":"2023-12-06T05:46:06+00:00","og_image":[{"url":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/exemple-de-fonction-de-format-vba.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Geschatte leestijd":"2 minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/exceladvisor.org\/nl\/formaat\/","url":"https:\/\/exceladvisor.org\/nl\/formaat\/","name":"Hoe gebruik ik de VBA FORMAT-functie? (Syntaxis + voorbeeld)","isPartOf":{"@id":"https:\/\/exceladvisor.org\/nl\/#website"},"primaryImageOfPage":{"@id":"https:\/\/exceladvisor.org\/nl\/formaat\/#primaryimage"},"image":{"@id":"https:\/\/exceladvisor.org\/nl\/formaat\/#primaryimage"},"thumbnailUrl":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/exemple-de-fonction-de-format-vba.png","datePublished":"2023-10-26T09:48:07+00:00","dateModified":"2023-12-06T05:46:06+00:00","description":"Leer hoe u de VBA FORMAT-functie gebruikt met syntaxis, argumenten en voorbeelden met voorbeeldcode.","breadcrumb":{"@id":"https:\/\/exceladvisor.org\/nl\/formaat\/#breadcrumb"},"inLanguage":"nl-NL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/exceladvisor.org\/nl\/formaat\/"]}]},{"@type":"ImageObject","inLanguage":"nl-NL","@id":"https:\/\/exceladvisor.org\/nl\/formaat\/#primaryimage","url":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/exemple-de-fonction-de-format-vba.png","contentUrl":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/exemple-de-fonction-de-format-vba.png"},{"@type":"BreadcrumbList","@id":"https:\/\/exceladvisor.org\/nl\/formaat\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/exceladvisor.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Hoe gebruik ik de vba format-functie?"}]},{"@type":"WebSite","@id":"https:\/\/exceladvisor.org\/nl\/#website","url":"https:\/\/exceladvisor.org\/nl\/","name":"Excel Advisor","description":"Uw gids voor datadominantie","publisher":{"@id":"https:\/\/exceladvisor.org\/nl\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/exceladvisor.org\/nl\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"nl-NL"},{"@type":"Organization","@id":"https:\/\/exceladvisor.org\/nl\/#organization","name":"Excel Advisor","url":"https:\/\/exceladvisor.org\/nl\/","logo":{"@type":"ImageObject","inLanguage":"nl-NL","@id":"https:\/\/exceladvisor.org\/nl\/#\/schema\/logo\/image\/","url":"https:\/\/exceladvisor.org\/nl\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png","contentUrl":"https:\/\/exceladvisor.org\/nl\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png","width":105,"height":36,"caption":"Excel Advisor"},"image":{"@id":"https:\/\/exceladvisor.org\/nl\/#\/schema\/logo\/image\/"}}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/pages\/1966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/comments?post=1966"}],"version-history":[{"count":1,"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/pages\/1966\/revisions"}],"predecessor-version":[{"id":2470,"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/pages\/1966\/revisions\/2470"}],"wp:attachment":[{"href":"https:\/\/exceladvisor.org\/nl\/wp-json\/wp\/v2\/media?parent=1966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}