{"id":3458,"date":"2023-10-26T09:48:07","date_gmt":"2023-10-26T09:48:07","guid":{"rendered":"https:\/\/exceladvisor.org\/de\/format\/"},"modified":"2023-12-03T13:06:41","modified_gmt":"2023-12-03T13:06:41","slug":"format","status":"publish","type":"page","link":"https:\/\/exceladvisor.org\/de\/format\/","title":{"rendered":"Wie verwende ich die vba-format-funktion?"},"content":{"rendered":"<div class=\"excel-vor-dem-inhalt\" id=\"excel-4238884955\"><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\">Die VBA-FORMAT-Funktion ist in der Textkategorie der VBA-Funktionen aufgef\u00fchrt. Wenn Sie es im VBA-Code verwenden, <strong>wird ein Wert zur\u00fcckgegeben, der<\/strong> im von Ihnen angegebenen Format formatiert ist. Einfach ausgedr\u00fcckt k\u00f6nnen Sie damit einen Ausdruck in ein Format formatieren, das Sie angeben k\u00f6nnen. Hier gibt es eine Sache, die Sie beachten sollten: Das zur\u00fcckgegebene Ergebnis ist vom Datentyp \u201eString\u201c.<\/p><h2 class=\"wp-block-heading\"> Syntax<\/h2><p> <strong>Format(Ausdruck,[Format],[FirstDayWeek],[FirstWeekYear])<\/strong><\/p><h2 class=\"wp-block-heading\"> Argumente<\/h2><ul><li> <strong>Ausdruck<\/strong> : Der Ausdruck, den Sie formatieren m\u00f6chten.<\/li><li> <strong>[Format]<\/strong> : Das Format, das Sie auf den Ausdruck anwenden m\u00f6chten. [Dies ist ein optionales Argument. Wenn es weggelassen wird, verwendet VBA standardm\u00e4\u00dfig \u201eAllgemein\u201c.\u201c<\/li><li> <strong>[FirstDayOfWeek]<\/strong> : Eine Zeichenfolge zum Definieren des ersten Tages der Woche [Dies ist ein optionales Argument und wenn es weggelassen wird, ist es standardm\u00e4\u00dfig vbSunday].<ul><li> vbUseSystemDayOfWeek \u2013 Abh\u00e4ngig von den Systemeinstellungen.<\/li><li> vbSonntag \u2013 Sonntag<\/li><li> vblunday \u2013 Montag<\/li><li> vbDienstag \u2013 Dienstag<\/li><li> vbMittwoch \u2013 Mittwoch<\/li><li> vbDonnerstag \u2013 Donnerstag<\/li><li> vbFreitag \u2013 Freitag<\/li><li> vbSamstag \u2013 Samstag<\/li><\/ul><\/li><li> <strong>[FirstWeekOfYear]<\/strong> : Eine Zeichenfolge zur Definition der ersten Woche des Jahres [Dies ist ein optionales Argument und wenn es weggelassen wird, ist es standardm\u00e4\u00dfig vbFirstJan1].<ul><li> vbSystem \u2013 Abh\u00e4ngig von den Systemeinstellungen.<\/li><li> vbFirstJan1 \u2013 Die Woche, in der der 1. Tag im Januar liegt.<\/li><li> vbFirstFourDays \u2013 Die erste Woche, die mindestens vier Tage im neuen Jahr enth\u00e4lt.<\/li><li> vbFirstFullWeek \u2013 Die erste volle Woche des neuen Jahres.<\/li><\/ul><\/li><\/ul><h2 class=\"wp-block-heading\"> Beispiel<\/h2><p> Um die Verwendung der VBA-FORMAT-Funktion praktisch zu verstehen, m\u00fcssen Sie das folgende Beispiel durchgehen, in dem wir damit einen VBA-Code geschrieben haben: <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" title=\"Beispielfunktion-VBA-Format\" 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> Im obigen Beispiel haben wir FORMAT mit drei verschiedenen vordefinierten Formaten verwendet:<\/p><ol><li> Konvertieren des Werts von Zelle A1 in das W\u00e4hrungsformat.<\/li><li> Konvertieren des Datums in Zelle A2 in ein langes Datum.<\/li><li> Konvertieren der Zahl in Zelle A3 in einen Booleschen Wert.<\/li><\/ol><h2 class=\"wp-block-heading\"> Kommentare<\/h2><ul><li> Sie k\u00f6nnen auch Ihr eigenes Format erstellen, um es im Argument \u201eformat\u201c zu verwenden. <\/li><\/ul><div class=\"wp-block-group more-tutorials is-layout-flow\"><div class=\"wp-block-group__inner-container\"><h2 class=\"wp-block-heading\"> Weitere 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\/de\/rechts\/\">RECHTS VBA<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/de\/rtrim\/\">VBA RTRIM<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/de\/raum\/\">VBA-SPACE<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/de\/strcomp\/\">VBA STRCOMP<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/de\/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-3458","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>Wie verwende ich die VBA-FORMAT-Funktion? (Syntax + Beispiel)<\/title>\n<meta name=\"description\" content=\"Erfahren Sie, wie Sie die VBA-FORMAT-Funktion mit Syntax, Argumenten und Beispielen mit Beispielcode verwenden.\" \/>\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\/de\/format\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Wie verwende ich die VBA-FORMAT-Funktion? (Syntax + Beispiel)\" \/>\n<meta property=\"og:description\" content=\"Erfahren Sie, wie Sie die VBA-FORMAT-Funktion mit Syntax, Argumenten und Beispielen mit Beispielcode verwenden.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/exceladvisor.org\/de\/format\/\" \/>\n<meta property=\"og:site_name\" content=\"Excel Advisor\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-03T13:06:41+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=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data1\" content=\"2\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/exceladvisor.org\/de\/format\/\",\"url\":\"https:\/\/exceladvisor.org\/de\/format\/\",\"name\":\"Wie verwende ich die VBA-FORMAT-Funktion? (Syntax + Beispiel)\",\"isPartOf\":{\"@id\":\"https:\/\/exceladvisor.org\/de\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/exceladvisor.org\/de\/format\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/exceladvisor.org\/de\/format\/#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-03T13:06:41+00:00\",\"description\":\"Erfahren Sie, wie Sie die VBA-FORMAT-Funktion mit Syntax, Argumenten und Beispielen mit Beispielcode verwenden.\",\"breadcrumb\":{\"@id\":\"https:\/\/exceladvisor.org\/de\/format\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/exceladvisor.org\/de\/format\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/exceladvisor.org\/de\/format\/#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\/de\/format\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/exceladvisor.org\/de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Wie verwende ich die vba-format-funktion?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/exceladvisor.org\/de\/#website\",\"url\":\"https:\/\/exceladvisor.org\/de\/\",\"name\":\"Excel Advisor\",\"description\":\"Ihr Leitfaden zur Datendominanz\",\"publisher\":{\"@id\":\"https:\/\/exceladvisor.org\/de\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/exceladvisor.org\/de\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/exceladvisor.org\/de\/#organization\",\"name\":\"Excel Advisor\",\"url\":\"https:\/\/exceladvisor.org\/de\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/exceladvisor.org\/de\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/exceladvisor.org\/de\/wp-content\/uploads\/2023\/11\/exceladvisor.org_.png\",\"contentUrl\":\"https:\/\/exceladvisor.org\/de\/wp-content\/uploads\/2023\/11\/exceladvisor.org_.png\",\"width\":105,\"height\":36,\"caption\":\"Excel Advisor\"},\"image\":{\"@id\":\"https:\/\/exceladvisor.org\/de\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Wie verwende ich die VBA-FORMAT-Funktion? (Syntax + Beispiel)","description":"Erfahren Sie, wie Sie die VBA-FORMAT-Funktion mit Syntax, Argumenten und Beispielen mit Beispielcode verwenden.","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\/de\/format\/","og_locale":"de_DE","og_type":"article","og_title":"Wie verwende ich die VBA-FORMAT-Funktion? (Syntax + Beispiel)","og_description":"Erfahren Sie, wie Sie die VBA-FORMAT-Funktion mit Syntax, Argumenten und Beispielen mit Beispielcode verwenden.","og_url":"https:\/\/exceladvisor.org\/de\/format\/","og_site_name":"Excel Advisor","article_modified_time":"2023-12-03T13:06:41+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":{"Gesch\u00e4tzte Lesezeit":"2\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/exceladvisor.org\/de\/format\/","url":"https:\/\/exceladvisor.org\/de\/format\/","name":"Wie verwende ich die VBA-FORMAT-Funktion? (Syntax + Beispiel)","isPartOf":{"@id":"https:\/\/exceladvisor.org\/de\/#website"},"primaryImageOfPage":{"@id":"https:\/\/exceladvisor.org\/de\/format\/#primaryimage"},"image":{"@id":"https:\/\/exceladvisor.org\/de\/format\/#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-03T13:06:41+00:00","description":"Erfahren Sie, wie Sie die VBA-FORMAT-Funktion mit Syntax, Argumenten und Beispielen mit Beispielcode verwenden.","breadcrumb":{"@id":"https:\/\/exceladvisor.org\/de\/format\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/exceladvisor.org\/de\/format\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/exceladvisor.org\/de\/format\/#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\/de\/format\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/exceladvisor.org\/de\/"},{"@type":"ListItem","position":2,"name":"Wie verwende ich die vba-format-funktion?"}]},{"@type":"WebSite","@id":"https:\/\/exceladvisor.org\/de\/#website","url":"https:\/\/exceladvisor.org\/de\/","name":"Excel Advisor","description":"Ihr Leitfaden zur Datendominanz","publisher":{"@id":"https:\/\/exceladvisor.org\/de\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/exceladvisor.org\/de\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":"Organization","@id":"https:\/\/exceladvisor.org\/de\/#organization","name":"Excel Advisor","url":"https:\/\/exceladvisor.org\/de\/","logo":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/exceladvisor.org\/de\/#\/schema\/logo\/image\/","url":"https:\/\/exceladvisor.org\/de\/wp-content\/uploads\/2023\/11\/exceladvisor.org_.png","contentUrl":"https:\/\/exceladvisor.org\/de\/wp-content\/uploads\/2023\/11\/exceladvisor.org_.png","width":105,"height":36,"caption":"Excel Advisor"},"image":{"@id":"https:\/\/exceladvisor.org\/de\/#\/schema\/logo\/image\/"}}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/exceladvisor.org\/de\/wp-json\/wp\/v2\/pages\/3458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exceladvisor.org\/de\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/exceladvisor.org\/de\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/exceladvisor.org\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exceladvisor.org\/de\/wp-json\/wp\/v2\/comments?post=3458"}],"version-history":[{"count":1,"href":"https:\/\/exceladvisor.org\/de\/wp-json\/wp\/v2\/pages\/3458\/revisions"}],"predecessor-version":[{"id":4292,"href":"https:\/\/exceladvisor.org\/de\/wp-json\/wp\/v2\/pages\/3458\/revisions\/4292"}],"wp:attachment":[{"href":"https:\/\/exceladvisor.org\/de\/wp-json\/wp\/v2\/media?parent=3458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}