{"id":4473,"date":"2023-07-10T20:26:07","date_gmt":"2023-07-10T20:26:07","guid":{"rendered":"https:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/"},"modified":"2023-07-10T20:26:07","modified_gmt":"2023-07-10T20:26:07","slug":"vba-telling-groter-dan-datum","status":"publish","type":"post","link":"https:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/","title":{"rendered":"Vba: getal groter dan datum"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">U kunt de volgende basissyntaxis in VBA gebruiken om het aantal datums groter dan een specifieke datum te tellen:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #0000ff;\">Sub<\/span> CountifGreaterDate()\nRange(\" <span style=\"color: #ff0000;\">D2<\/span> \") = WorksheetFunction.CountIf(Range(\" <span style=\"color: #ff0000;\">A2:A10<\/span> \"), \"&gt;\" &amp; Range(\" <span style=\"color: #ff0000;\">C2<\/span> \"))\n<span style=\"color: #0000ff;\">End Sub<\/span><\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">In dit specifieke voorbeeld wordt het aantal datums in het bereik <strong>A2:A10<\/strong> geteld dat groter is dan de datum in cel <strong>C2<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Het resultaat wordt vervolgens toegewezen aan cel <strong>D2<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Het volgende voorbeeld laat zien hoe u deze syntaxis in de praktijk kunt gebruiken.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Voorbeeld: Tel groter dan datum met VBA<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Stel dat we de volgende lijst met datums in Excel hebben en we willen graag het aantal datums weten groter dan <strong>25-04-2023<\/strong> :<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-34992 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/gdate1.png\" alt=\"\" width=\"526\" height=\"396\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">We kunnen hiervoor de volgende macro maken:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #0000ff;\">Sub<\/span> CountifGreaterDate()\nRange(\" <span style=\"color: #ff0000;\">D2<\/span> \") = WorksheetFunction.CountIf(Range(\" <span style=\"color: #ff0000;\">A2:A10<\/span> \"), \"&gt;\" &amp; Range(\" <span style=\"color: #ff0000;\">C2<\/span> \"))\n<span style=\"color: #0000ff;\">End Sub<\/span><\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">Wanneer we deze macro uitvoeren, ontvangen we de volgende uitvoer:<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-34993\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/cdate1.png\" alt=\"VBA-nummer indien groter dan datum\" width=\"511\" height=\"388\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Cel <strong>D2<\/strong> vertelt ons dat er <strong>6<\/strong> datums in het bereik <strong>A2:A10<\/strong> zijn die groter zijn dan <strong>25-04-2023<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Houd er rekening mee dat we de waarde in cel <strong>C2<\/strong> kunnen wijzigen en de macro opnieuw kunnen uitvoeren om het aantal datums groter dan een andere specifieke datum te tellen.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Stel dat we de datum in cel <strong>C2<\/strong> wijzigen in <strong>1-10-2023<\/strong> en de macro opnieuw uitvoeren:<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-34994 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/cdate2.png\" alt=\"\" width=\"533\" height=\"402\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">We zien dat er <strong>3<\/strong> datums zijn die groter zijn dan <strong>1-10-2023<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>Opmerking:<\/strong> als u het aantal datums <em>groter dan of gelijk aan<\/em> een specifieke datum wilt tellen, vervangt u eenvoudigweg de <strong>\u201c&gt;\u201d<\/strong> in de <strong>CountIf-<\/strong> functie door <strong>\u201c&gt;=\u201d<\/strong> .<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Aanvullende bronnen<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">In de volgende tutorials wordt uitgelegd hoe u andere veelvoorkomende taken in VBA kunt uitvoeren:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><a href=\"https:\/\/statorials.org\/nl\/vba-sorteren-op-datum\/\" target=\"_blank\" rel=\"noopener\">Hoe te sorteren op datum in VBA<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/vba-sumif-tussen-twee-datums\/\" target=\"_blank\" rel=\"noopener\">Hoe toe te voegen als tussen twee datums in VBA<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/vba-dagen-tot-nu-toe-toevoegen\/\" target=\"_blank\" rel=\"noopener\">Hoe dagen tot nu toe toe te voegen in VBA<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>U kunt de volgende basissyntaxis in VBA gebruiken om het aantal datums groter dan een specifieke datum te tellen: Sub CountifGreaterDate() Range(&#8220; D2 &#8222;) = WorksheetFunction.CountIf(Range(&#8220; A2:A10 &#8222;), &#8222;&gt;&#8220; &amp; Range(&#8220; C2 &#8222;)) End Sub In dit specifieke voorbeeld wordt het aantal datums in het bereik A2:A10 geteld dat groter is dan de datum in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-4473","post","type-post","status-publish","format-standard","hentry","category-gids"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>VBA: getal groter dan datum - Statorialen<\/title>\n<meta name=\"description\" content=\"In deze zelfstudie wordt met een voorbeeld uitgelegd hoe u met VBA rijen telt die groter zijn dan een specifieke datum.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"VBA: getal groter dan datum - Statorialen\" \/>\n<meta property=\"og:description\" content=\"In deze zelfstudie wordt met een voorbeeld uitgelegd hoe u met VBA rijen telt die groter zijn dan een specifieke datum.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-10T20:26:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/gdate1.png\" \/>\n<meta name=\"author\" content=\"Dr.benjamin anderson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dr.benjamin anderson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u00a0Minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/\",\"url\":\"https:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/\",\"name\":\"VBA: getal groter dan datum - Statorialen\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/nl\/#website\"},\"datePublished\":\"2023-07-10T20:26:07+00:00\",\"dateModified\":\"2023-07-10T20:26:07+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\"},\"description\":\"In deze zelfstudie wordt met een voorbeeld uitgelegd hoe u met VBA rijen telt die groter zijn dan een specifieke datum.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/statorials.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vba: getal groter dan datum\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/nl\/#website\",\"url\":\"https:\/\/statorials.org\/nl\/\",\"name\":\"Statorials\",\"description\":\"Uw gids voor statistische competentie\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/nl\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"de\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\",\"name\":\"Dr.benjamin anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr.benjamin anderson\"},\"description\":\"Ik ben Benjamin, een gepensioneerde hoogleraar statistiek die nu een toegewijde Statorials-lesgever is. Ik heb uitgebreide ervaring en expertise op het gebied van statistiek en ik ben vastbesloten om mijn kennis te delen met studenten via Statorials. Lees verder\",\"sameAs\":[\"http:\/\/statorials.org\/nl\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"VBA: getal groter dan datum - Statorialen","description":"In deze zelfstudie wordt met een voorbeeld uitgelegd hoe u met VBA rijen telt die groter zijn dan een specifieke datum.","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:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/","og_locale":"de_DE","og_type":"article","og_title":"VBA: getal groter dan datum - Statorialen","og_description":"In deze zelfstudie wordt met een voorbeeld uitgelegd hoe u met VBA rijen telt die groter zijn dan een specifieke datum.","og_url":"https:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/","og_site_name":"Statorials","article_published_time":"2023-07-10T20:26:07+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/gdate1.png"}],"author":"Dr.benjamin anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr.benjamin anderson","Gesch\u00e4tzte Lesezeit":"1\u00a0Minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/","url":"https:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/","name":"VBA: getal groter dan datum - Statorialen","isPartOf":{"@id":"https:\/\/statorials.org\/nl\/#website"},"datePublished":"2023-07-10T20:26:07+00:00","dateModified":"2023-07-10T20:26:07+00:00","author":{"@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219"},"description":"In deze zelfstudie wordt met een voorbeeld uitgelegd hoe u met VBA rijen telt die groter zijn dan een specifieke datum.","breadcrumb":{"@id":"https:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/nl\/vba-telling-groter-dan-datum\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/statorials.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Vba: getal groter dan datum"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/nl\/#website","url":"https:\/\/statorials.org\/nl\/","name":"Statorials","description":"Uw gids voor statistische competentie","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/nl\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"de"},{"@type":"Person","@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219","name":"Dr.benjamin anderson","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/image\/","url":"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"Dr.benjamin anderson"},"description":"Ik ben Benjamin, een gepensioneerde hoogleraar statistiek die nu een toegewijde Statorials-lesgever is. Ik heb uitgebreide ervaring en expertise op het gebied van statistiek en ik ben vastbesloten om mijn kennis te delen met studenten via Statorials. Lees verder","sameAs":["http:\/\/statorials.org\/nl"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/4473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/comments?post=4473"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/4473\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/media?parent=4473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/categories?post=4473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/tags?post=4473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}