{"id":4970,"date":"2023-07-05T19:14:52","date_gmt":"2023-07-05T19:14:52","guid":{"rendered":"https:\/\/statorials.org\/it\/cancella-la-formattazione-vba\/"},"modified":"2023-07-05T19:14:52","modified_gmt":"2023-07-05T19:14:52","slug":"cancella-la-formattazione-vba","status":"publish","type":"post","link":"https:\/\/statorials.org\/it\/cancella-la-formattazione-vba\/","title":{"rendered":"Vba: come cancellare la formattazione della cella"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">\u00c8 possibile utilizzare i seguenti metodi per cancellare la formattazione delle celle in Excel utilizzando VBA:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>Metodo 1: cancella la formattazione da celle specifiche<\/strong><\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #0000ff;\">SubClearFormattingRange<\/span> ()<\/strong>\n<strong>Range(\"A2:A11\").ClearFormats<\/strong>\n<span style=\"color: #0000ff;\"><strong>End Sub<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">Questa particolare macro canceller\u00e0 la formattazione di tutte le celle nell&#8217;intervallo <strong>A2: A11<\/strong> nel foglio attualmente attivo.<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>Metodo 2: cancella la formattazione da tutte le celle del foglio<\/strong><\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #0000ff;\">Sub<\/span> ClearFormattingAll()<\/strong>\n<strong>Cells.ClearFormats<\/strong>\n<span style=\"color: #0000ff;\"><strong>End Sub<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">Questa particolare macro canceller\u00e0 la formattazione di tutte le celle sul foglio attualmente attivo.<\/span><\/p>\n<p> <span style=\"color: #000000;\">L&#8217;esempio seguente mostra come utilizzare nella pratica ciascun metodo con il seguente foglio in Excel:<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-38763 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/formulaire-clair1.png\" alt=\"\" width=\"426\" height=\"405\" srcset=\"\" sizes=\"\"><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Esempio 1: utilizzare VBA per cancellare la formattazione da celle specifiche<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Diciamo che vogliamo cancellare la formattazione di tutte le celle nell&#8217;intervallo <strong>A2:A11<\/strong> .<\/span><\/p>\n<p> <span style=\"color: #000000;\">Per fare ci\u00f2 possiamo creare la seguente macro:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #0000ff;\">SubClearFormattingRange<\/span> ()<\/strong>\n<strong>Range(\"A2:A11\").ClearFormats<\/strong>\n<span style=\"color: #0000ff;\"><strong>End Sub<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">Una volta eseguita questa macro, la formattazione di tutte le celle nell&#8217;intervallo <strong>A2:A11<\/strong> verr\u00e0 cancellata:<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-38764 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/formulaire-clair2.png\" alt=\"\" width=\"490\" height=\"424\" srcset=\"\" sizes=\"\"><\/p>\n<p> <span style=\"color: #000000;\"><span style=\"color: #000000;\">Tieni presente che il carattere corsivo, il colore del carattere rosso e i bordi sono stati tutti rimossi dalle celle nell&#8217;intervallo <strong>A2:A11<\/strong> .<\/span><\/span><\/p>\n<p> <span style=\"color: #000000;\">Tutte le altre celle del foglio hanno mantenuto la formattazione.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Esempio 2: utilizzare VBA per cancellare la formattazione da tutte le celle del foglio<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Diciamo che vogliamo cancellare la formattazione di tutte le celle del foglio.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Per fare ci\u00f2 possiamo creare la seguente macro:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #0000ff;\">Sub<\/span> ClearFormattingAll()<\/strong>\n<strong>Cells.ClearFormats<\/strong>\n<span style=\"color: #0000ff;\"><strong>End Sub<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">Una volta eseguita questa macro, la formattazione di tutte le celle dell&#8217;intero foglio verr\u00e0 cancellata:<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-38765 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/formulaire-clair3.png\" alt=\"\" width=\"495\" height=\"421\" srcset=\"\" sizes=\"\"><\/p>\n<p> <span style=\"color: #000000;\">Nota che la formattazione \u00e8 stata rimossa da tutte le celle dell&#8217;intero foglio.<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>Nota<\/strong> : <a href=\"https:\/\/learn.microsoft.com\/en-us\/office\/vba\/api\/excel.range.clearformats\" target=\"_blank\" rel=\"noopener\">qui<\/a> \u00e8 possibile trovare la documentazione completa del metodo <b>ClearFormats<\/b> in VBA.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Risorse addizionali<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">I seguenti tutorial spiegano come eseguire altre attivit\u00e0 comuni in VBA:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><a href=\"https:\/\/statorials.org\/it\/vba-cancella-il-contenuto-se-la-cella-contiene\/\" target=\"_blank\" rel=\"noopener\">VBA: come cancellare il contenuto se la cella contiene un valore specifico<\/a><br \/> <a href=\"https:\/\/statorials.org\/it\/vba-elimina-la-riga-in-base-al-valore-della-cella\/\" target=\"_blank\" rel=\"noopener\">VBA: come eliminare le righe in base al valore della cella<\/a><br \/> <a href=\"https:\/\/statorials.org\/it\/filtro-cancella-vba\/\" target=\"_blank\" rel=\"noopener\">VBA: come cancellare i filtri in Excel<\/a><br \/><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00c8 possibile utilizzare i seguenti metodi per cancellare la formattazione delle celle in Excel utilizzando VBA: Metodo 1: cancella la formattazione da celle specifiche SubClearFormattingRange () Range(&#8220;A2:A11&#8221;).ClearFormats End Sub Questa particolare macro canceller\u00e0 la formattazione di tutte le celle nell&#8217;intervallo A2: A11 nel foglio attualmente attivo. Metodo 2: cancella la formattazione da tutte le celle [&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":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>VBA: come cancellare la formattazione delle celle - Statorials<\/title>\n<meta name=\"description\" content=\"Questo tutorial spiega come cancellare la formattazione delle celle in Excel utilizzando VBA, con diversi esempi.\" \/>\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\/it\/cancella-la-formattazione-vba\/\" \/>\n<meta property=\"og:locale\" content=\"it_IT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"VBA: come cancellare la formattazione delle celle - Statorials\" \/>\n<meta property=\"og:description\" content=\"Questo tutorial spiega come cancellare la formattazione delle celle in Excel utilizzando VBA, con diversi esempi.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/it\/cancella-la-formattazione-vba\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-05T19:14:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/formulaire-clair1.png\" \/>\n<meta name=\"author\" content=\"Benjamin anderson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Benjamin anderson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minuto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/it\/cancella-la-formattazione-vba\/\",\"url\":\"https:\/\/statorials.org\/it\/cancella-la-formattazione-vba\/\",\"name\":\"VBA: come cancellare la formattazione delle celle - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/it\/#website\"},\"datePublished\":\"2023-07-05T19:14:52+00:00\",\"dateModified\":\"2023-07-05T19:14:52+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/it\/#\/schema\/person\/0896f191fb9fb019f2cd8623112cb3ae\"},\"description\":\"Questo tutorial spiega come cancellare la formattazione delle celle in Excel utilizzando VBA, con diversi esempi.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/it\/cancella-la-formattazione-vba\/#breadcrumb\"},\"inLanguage\":\"it-IT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/it\/cancella-la-formattazione-vba\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/it\/cancella-la-formattazione-vba\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Casa\",\"item\":\"https:\/\/statorials.org\/it\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vba: come cancellare la formattazione della cella\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/it\/#website\",\"url\":\"https:\/\/statorials.org\/it\/\",\"name\":\"Statorials\",\"description\":\"La tua guida all&#039;alfabetizzazione statistica!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/it\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"it-IT\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/it\/#\/schema\/person\/0896f191fb9fb019f2cd8623112cb3ae\",\"name\":\"Benjamin anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\/\/statorials.org\/it\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/it\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/it\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"Benjamin anderson\"},\"description\":\"Ciao, sono Benjamin, un professore di statistica in pensione diventato insegnante dedicato di Statorials. Con una vasta esperienza e competenza nel campo della statistica, sono ansioso di condividere le mie conoscenze per potenziare gli studenti attraverso Statorials. Scopri di pi\u00f9\",\"sameAs\":[\"https:\/\/statorials.org\/it\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"VBA: come cancellare la formattazione delle celle - Statorials","description":"Questo tutorial spiega come cancellare la formattazione delle celle in Excel utilizzando VBA, con diversi esempi.","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\/it\/cancella-la-formattazione-vba\/","og_locale":"it_IT","og_type":"article","og_title":"VBA: come cancellare la formattazione delle celle - Statorials","og_description":"Questo tutorial spiega come cancellare la formattazione delle celle in Excel utilizzando VBA, con diversi esempi.","og_url":"https:\/\/statorials.org\/it\/cancella-la-formattazione-vba\/","og_site_name":"Statorials","article_published_time":"2023-07-05T19:14:52+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/formulaire-clair1.png"}],"author":"Benjamin anderson","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Benjamin anderson","Est. reading time":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/it\/cancella-la-formattazione-vba\/","url":"https:\/\/statorials.org\/it\/cancella-la-formattazione-vba\/","name":"VBA: come cancellare la formattazione delle celle - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/it\/#website"},"datePublished":"2023-07-05T19:14:52+00:00","dateModified":"2023-07-05T19:14:52+00:00","author":{"@id":"https:\/\/statorials.org\/it\/#\/schema\/person\/0896f191fb9fb019f2cd8623112cb3ae"},"description":"Questo tutorial spiega come cancellare la formattazione delle celle in Excel utilizzando VBA, con diversi esempi.","breadcrumb":{"@id":"https:\/\/statorials.org\/it\/cancella-la-formattazione-vba\/#breadcrumb"},"inLanguage":"it-IT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/it\/cancella-la-formattazione-vba\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/it\/cancella-la-formattazione-vba\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Casa","item":"https:\/\/statorials.org\/it\/"},{"@type":"ListItem","position":2,"name":"Vba: come cancellare la formattazione della cella"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/it\/#website","url":"https:\/\/statorials.org\/it\/","name":"Statorials","description":"La tua guida all&#039;alfabetizzazione statistica!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/it\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"it-IT"},{"@type":"Person","@id":"https:\/\/statorials.org\/it\/#\/schema\/person\/0896f191fb9fb019f2cd8623112cb3ae","name":"Benjamin anderson","image":{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/statorials.org\/it\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/it\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/it\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"Benjamin anderson"},"description":"Ciao, sono Benjamin, un professore di statistica in pensione diventato insegnante dedicato di Statorials. Con una vasta esperienza e competenza nel campo della statistica, sono ansioso di condividere le mie conoscenze per potenziare gli studenti attraverso Statorials. Scopri di pi\u00f9","sameAs":["https:\/\/statorials.org\/it"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/it\/wp-json\/wp\/v2\/posts\/4970"}],"collection":[{"href":"https:\/\/statorials.org\/it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/it\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/it\/wp-json\/wp\/v2\/comments?post=4970"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/it\/wp-json\/wp\/v2\/posts\/4970\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/it\/wp-json\/wp\/v2\/media?parent=4970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/it\/wp-json\/wp\/v2\/categories?post=4970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/it\/wp-json\/wp\/v2\/tags?post=4970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}