{"id":5089,"date":"2023-07-03T22:06:52","date_gmt":"2023-07-03T22:06:52","guid":{"rendered":"https:\/\/statorials.org\/nl\/excel-telt-op-kleur\/"},"modified":"2023-07-03T22:06:52","modified_gmt":"2023-07-03T22:06:52","slug":"excel-telt-op-kleur","status":"publish","type":"post","link":"https:\/\/statorials.org\/nl\/excel-telt-op-kleur\/","title":{"rendered":"Cellen op kleur tellen in excel (met voorbeeld)"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">Vaak wilt u misschien het aantal cellen in Excel tellen op basis van hun kleur.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Stel dat we de volgende gegevensset hebben en het aantal cellen per kleur willen tellen:<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-34810 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/sc2.png\" alt=\"\" width=\"494\" height=\"406\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">De eenvoudigste manier om dit te doen is door VBA-code in Excel te schrijven.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Dit lijkt misschien intimiderend als u niet bekend bent met VBA, maar het proces is eenvoudig en het volgende stapsgewijze voorbeeld laat precies zien hoe u dit moet doen.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Stap 1: Voer de gegevens in<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Voer eerst de gegevenswaarden in Excel in:<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-34810 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/sc2.png\" alt=\"\" width=\"494\" height=\"406\" srcset=\"\" sizes=\"auto, \"><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Stap 2: Toon het tabblad Ontwikkelaar in Excel<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Vervolgens moeten we ervoor zorgen dat het tabblad <strong>Ontwikkelaars<\/strong> zichtbaar is op het bovenste lint van Excel.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Om dit te doen, klikt u op het tabblad <strong>Bestand<\/strong> , vervolgens <strong>op Opties<\/strong> en vervolgens <strong>op Lint aanpassen<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Onder de sectie met de titel <strong>Hoofdtabbladen<\/strong> vinkt u het vakje naast <strong>Ontwikkelaar<\/strong> aan en klikt u vervolgens op <strong>OK<\/strong> :<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-34809 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/sc1.png\" alt=\"\" width=\"698\" height=\"544\" srcset=\"\" sizes=\"auto, \"><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Stap 3: Maak een macro met VBA<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Klik vervolgens op het tabblad <strong>Ontwikkelaars<\/strong> op het bovenste lint en klik vervolgens op het <strong>Visual Basic-<\/strong> pictogram:<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-34811 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/sc3.png\" alt=\"\" width=\"640\" height=\"197\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Klik vervolgens op het tabblad <strong>Invoegen<\/strong> en klik vervolgens op <strong>Module<\/strong> in het vervolgkeuzemenu:<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-34812 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/sc4.png\" alt=\"\" width=\"513\" height=\"409\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Plak vervolgens de volgende code in de code-editor van de module:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #0000ff;\">Function<\/span> CountByColor(CellRange As Range, CellColor As Range)\n\n<span style=\"color: #0000ff;\">Dim<\/span> CellColorValue <span style=\"color: #0000ff;\">As<\/span> Integer\n<span style=\"color: #0000ff;\">Dim<\/span> RunningCount <span style=\"color: #0000ff;\">As<\/span> Long\n\nCellColorValue = CellColor.Interior.ColorIndex\n<span style=\"color: #0000ff;\">Set<\/span> i = CellRange\n\n<span style=\"color: #0000ff;\">For Each<\/span> i <span style=\"color: #0000ff;\">In<\/span> CellRange\n    <span style=\"color: #0000ff;\">If<\/span> i.Interior.ColorIndex = CellColorValue <span style=\"color: #0000ff;\">Then<\/span>\n    RunningCount = RunningCount + 1\n<span style=\"color: #0000ff;\">End If<\/span>\n<span style=\"color: #0000ff;\">Next<\/span> i\n\nCountByColor = RunningCount\n\n<span style=\"color: #0000ff;\">End Function\n<\/span><\/strong><\/pre>\n<p> <span style=\"color: #000000;\">De volgende schermafbeelding laat zien hoe u dit doet:<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-39632 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/comptecouleur0.png\" alt=\"\" width=\"668\" height=\"560\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Sluit vervolgens de VB-editor.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Stap 4: Gebruik Macro om op kleur te tellen<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Ten slotte kunnen we de macro die we hebben gemaakt gebruiken om het aantal cellen te tellen op basis van kleur.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Vul eerst de cellen <strong>C2:C4<\/strong> in met de kleuren waarvan u de telling wilt vinden.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Typ vervolgens de volgende formule in cel <strong>D2<\/strong> :<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 17px;\"> <strong>=CountByColor( <span style=\"color: #3366ff;\">$A$2:$A$11<\/span> , <span style=\"color: #ff0000;\">C2<\/span> )<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Sleep en vul deze formule naar elke resterende cel in kolom D en de formule telt automatisch elk van de cellen met specifieke achtergrondkleuren:<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-39634 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/comptecouleur2.png\" alt=\"\" width=\"513\" height=\"400\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">We kunnen bijvoorbeeld zien:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">Het aantal cellen op een lichtgroene achtergrond is <strong>3<\/strong> .<\/span><\/li>\n<li> <span style=\"color: #000000;\">Het aantal cellen op een lichtblauwe achtergrond is <strong>4<\/strong> .<\/span><\/li>\n<li> <span style=\"color: #000000;\">Het aantal cellen op een lichtoranje achtergrond is <strong>3<\/strong> .<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\"><strong>Opmerking<\/strong> : als u in kolom C een celkleur opgeeft die niet in het zoekbereik voorkomt, retourneert de functie eenvoudigweg de waarde 0.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Aanvullende bronnen<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">In de volgende zelfstudies wordt uitgelegd hoe u andere veelvoorkomende bewerkingen in Excel uitvoert:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><a href=\"https:\/\/statorials.org\/nl\/excel-gemiddelde-per-kleur\/\" target=\"_blank\" rel=\"noopener\">Hoe u op kleur kunt gemiddelde in Excel<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/tellen-per-excel-groep\/\" target=\"_blank\" rel=\"noopener\">Hoe te tellen per groep in Excel<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/excel-enkele-telling-per-groep\/\" target=\"_blank\" rel=\"noopener\">Hoe unieke waarden per groep te tellen in Excel<\/a><br \/><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Vaak wilt u misschien het aantal cellen in Excel tellen op basis van hun kleur. Stel dat we de volgende gegevensset hebben en het aantal cellen per kleur willen tellen: De eenvoudigste manier om dit te doen is door VBA-code in Excel te schrijven. Dit lijkt misschien intimiderend als u niet bekend bent met VBA, [&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-5089","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>Hoe cellen op kleur te tellen in Excel (met voorbeeld) - Statorials<\/title>\n<meta name=\"description\" content=\"In deze tutorial wordt stapsgewijs uitgelegd hoe u cellen op kleur kunt tellen in Excel.\" \/>\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\/excel-telt-op-kleur\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hoe cellen op kleur te tellen in Excel (met voorbeeld) - Statorials\" \/>\n<meta property=\"og:description\" content=\"In deze tutorial wordt stapsgewijs uitgelegd hoe u cellen op kleur kunt tellen in Excel.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/nl\/excel-telt-op-kleur\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-03T22:06:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/sc2.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=\"2\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/nl\/excel-telt-op-kleur\/\",\"url\":\"https:\/\/statorials.org\/nl\/excel-telt-op-kleur\/\",\"name\":\"Hoe cellen op kleur te tellen in Excel (met voorbeeld) - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/nl\/#website\"},\"datePublished\":\"2023-07-03T22:06:52+00:00\",\"dateModified\":\"2023-07-03T22:06:52+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\"},\"description\":\"In deze tutorial wordt stapsgewijs uitgelegd hoe u cellen op kleur kunt tellen in Excel.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/nl\/excel-telt-op-kleur\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/nl\/excel-telt-op-kleur\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/nl\/excel-telt-op-kleur\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/statorials.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cellen op kleur tellen in excel (met voorbeeld)\"}]},{\"@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":"Hoe cellen op kleur te tellen in Excel (met voorbeeld) - Statorials","description":"In deze tutorial wordt stapsgewijs uitgelegd hoe u cellen op kleur kunt tellen in Excel.","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\/excel-telt-op-kleur\/","og_locale":"de_DE","og_type":"article","og_title":"Hoe cellen op kleur te tellen in Excel (met voorbeeld) - Statorials","og_description":"In deze tutorial wordt stapsgewijs uitgelegd hoe u cellen op kleur kunt tellen in Excel.","og_url":"https:\/\/statorials.org\/nl\/excel-telt-op-kleur\/","og_site_name":"Statorials","article_published_time":"2023-07-03T22:06:52+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/sc2.png"}],"author":"Dr.benjamin anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr.benjamin anderson","Gesch\u00e4tzte Lesezeit":"2\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/nl\/excel-telt-op-kleur\/","url":"https:\/\/statorials.org\/nl\/excel-telt-op-kleur\/","name":"Hoe cellen op kleur te tellen in Excel (met voorbeeld) - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/nl\/#website"},"datePublished":"2023-07-03T22:06:52+00:00","dateModified":"2023-07-03T22:06:52+00:00","author":{"@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219"},"description":"In deze tutorial wordt stapsgewijs uitgelegd hoe u cellen op kleur kunt tellen in Excel.","breadcrumb":{"@id":"https:\/\/statorials.org\/nl\/excel-telt-op-kleur\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/nl\/excel-telt-op-kleur\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/nl\/excel-telt-op-kleur\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/statorials.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Cellen op kleur tellen in excel (met voorbeeld)"}]},{"@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\/5089","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=5089"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/5089\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/media?parent=5089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/categories?post=5089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/tags?post=5089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}