{"id":775,"date":"2013-07-16T07:52:41","date_gmt":"2013-07-16T07:52:41","guid":{"rendered":"http:\/\/excelvbatutor.com\/?p=775"},"modified":"2013-07-16T07:53:15","modified_gmt":"2013-07-16T07:53:15","slug":"formatting-font-and-background-colors-in-excel-spreadsheet","status":"publish","type":"post","link":"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/","title":{"rendered":"Formatting Font and Background Colors in Excel Spreadsheet"},"content":{"rendered":"<p>We can write Excel VBA code to format the color of a MS Excel spreadsheet. Using \u00a0Excel VBA\u00a0code, we can change the font color as well as the the background color of each cell effortlessly.<\/p>\n<p>Alright, let\u2019s create a program that can format random font and background colors using a randomize process. Colors can be assigned using a number of methods in Excel VBA, but it is easier to use the RGB function. The RGB function has three numbers corresponding to the red, green and blue components. The range of values of the three numbers is from 0 to 255. A mixture of the three primary colors will produce different colors.<\/p>\n<p>More details here:<\/p>\n<p><a href=\"http:\/\/excelvbatutor.com\/index.php\/excel-vba-lesson-12\/\">http:\/\/excelvbatutor.com\/index.php\/excel-vba-lesson-12\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We can write Excel VBA code to format the color of a MS Excel spreadsheet. Using \u00a0Excel VBA\u00a0code, we can change the font color as well as the the background color of each cell effortlessly. Alright, let\u2019s create a program that can format random font and background colors using a randomize process. Colors can be &hellip; <a href=\"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Formatting Font and Background Colors in Excel Spreadsheet&#8221;<\/span><\/a><\/p>\n","protected":false},"author":5012,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-775","post","type-post","status-publish","format-standard","hentry","category-general"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Formatting Excel Spreadsheet using Excel VBA<\/title>\n<meta name=\"description\" content=\"This article explains how to format the color of a MS Excel spreadsheet\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Formatting Excel Spreadsheet using Excel VBA\" \/>\n<meta property=\"og:description\" content=\"This article explains how to format the color of a MS Excel spreadsheet\" \/>\n<meta property=\"og:url\" content=\"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/\" \/>\n<meta property=\"og:site_name\" content=\"Learn Excel VBA Online \u2013 Step-by-Step Tutorials &amp; Courses | ExcelVBATutor\" \/>\n<meta property=\"article:published_time\" content=\"2013-07-16T07:52:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-07-16T07:53:15+00:00\" \/>\n<meta name=\"author\" content=\"Liew Voon Kiong\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Liew Voon Kiong\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/\"},\"author\":{\"name\":\"Liew Voon Kiong\",\"@id\":\"https:\/\/excelvbatutor.com\/#\/schema\/person\/43d141df324e8eb01509c5f5d8a4a76a\"},\"headline\":\"Formatting Font and Background Colors in Excel Spreadsheet\",\"datePublished\":\"2013-07-16T07:52:41+00:00\",\"dateModified\":\"2013-07-16T07:53:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/\"},\"wordCount\":128,\"commentCount\":0,\"articleSection\":[\"General\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/\",\"url\":\"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/\",\"name\":\"Formatting Excel Spreadsheet using Excel VBA\",\"isPartOf\":{\"@id\":\"https:\/\/excelvbatutor.com\/#website\"},\"datePublished\":\"2013-07-16T07:52:41+00:00\",\"dateModified\":\"2013-07-16T07:53:15+00:00\",\"author\":{\"@id\":\"https:\/\/excelvbatutor.com\/#\/schema\/person\/43d141df324e8eb01509c5f5d8a4a76a\"},\"description\":\"This article explains how to format the color of a MS Excel spreadsheet\",\"breadcrumb\":{\"@id\":\"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/excelvbatutor.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Formatting Font and Background Colors in Excel Spreadsheet\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/excelvbatutor.com\/#website\",\"url\":\"https:\/\/excelvbatutor.com\/\",\"name\":\"Learn Excel VBA Online \u2013 Step-by-Step Tutorials &amp; Courses | ExcelVBATutor\",\"description\":\"Master Excel VBA with free tutorials, examples, and personalized guidance. Perfect for beginners and advanced users looking to automate Excel.\",\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/excelvbatutor.com\/#\/schema\/person\/43d141df324e8eb01509c5f5d8a4a76a\",\"name\":\"Liew Voon Kiong\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/excelvbatutor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3e3750a9c46828b988fc9432ec548bc847e79637d0971da3f409da2ec81297df?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3e3750a9c46828b988fc9432ec548bc847e79637d0971da3f409da2ec81297df?s=96&d=mm&r=g\",\"caption\":\"Liew Voon Kiong\"},\"url\":\"https:\/\/excelvbatutor.com\/index.php\/author\/ajs7051vba\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Formatting Excel Spreadsheet using Excel VBA","description":"This article explains how to format the color of a MS Excel spreadsheet","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:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/","og_locale":"en_US","og_type":"article","og_title":"Formatting Excel Spreadsheet using Excel VBA","og_description":"This article explains how to format the color of a MS Excel spreadsheet","og_url":"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/","og_site_name":"Learn Excel VBA Online \u2013 Step-by-Step Tutorials &amp; Courses | ExcelVBATutor","article_published_time":"2013-07-16T07:52:41+00:00","article_modified_time":"2013-07-16T07:53:15+00:00","author":"Liew Voon Kiong","twitter_misc":{"Written by":"Liew Voon Kiong","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/#article","isPartOf":{"@id":"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/"},"author":{"name":"Liew Voon Kiong","@id":"https:\/\/excelvbatutor.com\/#\/schema\/person\/43d141df324e8eb01509c5f5d8a4a76a"},"headline":"Formatting Font and Background Colors in Excel Spreadsheet","datePublished":"2013-07-16T07:52:41+00:00","dateModified":"2013-07-16T07:53:15+00:00","mainEntityOfPage":{"@id":"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/"},"wordCount":128,"commentCount":0,"articleSection":["General"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/","url":"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/","name":"Formatting Excel Spreadsheet using Excel VBA","isPartOf":{"@id":"https:\/\/excelvbatutor.com\/#website"},"datePublished":"2013-07-16T07:52:41+00:00","dateModified":"2013-07-16T07:53:15+00:00","author":{"@id":"https:\/\/excelvbatutor.com\/#\/schema\/person\/43d141df324e8eb01509c5f5d8a4a76a"},"description":"This article explains how to format the color of a MS Excel spreadsheet","breadcrumb":{"@id":"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/excelvbatutor.com\/index.php\/2013\/07\/16\/formatting-font-and-background-colors-in-excel-spreadsheet\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/excelvbatutor.com\/"},{"@type":"ListItem","position":2,"name":"Formatting Font and Background Colors in Excel Spreadsheet"}]},{"@type":"WebSite","@id":"https:\/\/excelvbatutor.com\/#website","url":"https:\/\/excelvbatutor.com\/","name":"Learn Excel VBA Online \u2013 Step-by-Step Tutorials &amp; Courses | ExcelVBATutor","description":"Master Excel VBA with free tutorials, examples, and personalized guidance. Perfect for beginners and advanced users looking to automate Excel.","inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/excelvbatutor.com\/#\/schema\/person\/43d141df324e8eb01509c5f5d8a4a76a","name":"Liew Voon Kiong","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/excelvbatutor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3e3750a9c46828b988fc9432ec548bc847e79637d0971da3f409da2ec81297df?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3e3750a9c46828b988fc9432ec548bc847e79637d0971da3f409da2ec81297df?s=96&d=mm&r=g","caption":"Liew Voon Kiong"},"url":"https:\/\/excelvbatutor.com\/index.php\/author\/ajs7051vba\/"}]}},"_links":{"self":[{"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/posts\/775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/users\/5012"}],"replies":[{"embeddable":true,"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/comments?post=775"}],"version-history":[{"count":2,"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/posts\/775\/revisions"}],"predecessor-version":[{"id":777,"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/posts\/775\/revisions\/777"}],"wp:attachment":[{"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/media?parent=775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/categories?post=775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/tags?post=775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}