{"id":11252,"date":"2019-08-12T10:32:23","date_gmt":"2019-08-12T08:32:23","guid":{"rendered":"https:\/\/www.myexcelonline.com\/?p=11252"},"modified":"2024-04-15T22:12:45","modified_gmt":"2024-04-15T20:12:45","slug":"highlight-all-named-ranges-using-macros-in-excel","status":"publish","type":"post","link":"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/highlight-all-named-ranges-using-macros-in-excel\/","title":{"rendered":"Highlight all Named Ranges Using Macros In Excel"},"content":{"rendered":"<p>If you have a lot of named ranges in your worksheet, and you want to see which ones are there quickly? You can quickly <strong>highlight all named ranges<\/strong> using Excel <a class=\"wpil_keyword_link\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/101-excel-macros-examples\/\" target=\"_blank\" rel=\"noopener\" title=\"Macros\" data-wpil-keyword-link=\"linked\">Macros<\/a>!<\/p>\n<p>Make sure your Excel has the Developer Tab enabled following\u00a0<a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/how-to-create-your-first-macro-button-in-excel-beginners-tutorial\/\" target=\"_blank\" rel=\"noopener noreferrer\">this tutorial<\/a>.<\/p>\n<p>I explain how you can do this below step by step!<\/p>\n<p><em><strong>What does it do?<\/strong><\/em><\/p>\n<p>Highlight all Named Ranges<\/p>\n<p><em><strong>Copy Source Code:<\/strong><\/em><\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\n\r\nSub HighlightAllNamedRanges()\r\n\r\nDim RangeName As Name\r\nDim SelectedRange As Range\r\nOn Error Resume Next\r\n\r\n&lt;a href=&quot;https:\/\/www.myexcelonline.com\/meo-staging\/blog\/loop-through-defined-ranges\/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Loop through all named ranges&lt;\/a&gt;\r\nFor Each RangeName In ActiveWorkbook.Names\r\nSet SelectedRange = RangeName.RefersToRange\r\n\r\n'Highlight with the color yellow\r\nSelectedRange.Interior.ColorIndex = 27\r\nNext RangeName\r\n\r\nEnd Sub\r\n\r\n<\/pre>\n<p><em><strong>Final Result:\u00a0<\/strong><\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Highlight all Named Ranges Using Macros In Excel\" class=\"aligncenter size-full wp-image-11710\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-04.jpg\" alt=\"Highlight all Named Ranges Using Macros In Excel\" width=\"756\" height=\"297\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-04.jpg 756w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-04-300x118.jpg 300w\" sizes=\"(max-width: 756px) 100vw, 756px\" \/><\/p>\n<p><em><strong>Exercise Workbook:<\/strong><\/em><\/p>\n<div class=\"after-post-box\">\n<p><iframe src=\"https:\/\/www.youtube.com\/embed\/6VrSf6q9DX8?rel=0 \" width=\"800\" height=\"400\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"width: 0px;overflow: hidden;line-height: 0\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><a href=\"https:\/\/www.youtube.com\/c\/MyExcelOnlinecomtutorials?sub_confirmation=1\" target=\"_blank\" rel=\"noopener noreferrer nofollow\"><img loading=\"lazy\" decoding=\"async\" class=\"alignmiddle wp-image-111468 size-full\" style=\"vertical-align: middle\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/04\/1.yt_.png\" alt=\"\" title=\"\"><\/a><\/p>\n<p class=\"line-two\"><a class=\"IRPP_minimalist icon-download button small\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/08\/Highlight-all-Named-Ranges.xlsm\" target=\"_blank\" rel=\"noopener noreferrer\" data-leadbox=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges.xlsm\" data-leadbox-id=\"147284833f72a2:12f08263ab46dc\"><span class=\"ctaText px-3 text-capitalize\">Download excel workbook<i class=\"fa fa-download\"><\/i><\/span><span class=\"postTitle px-3\">Highlight-all-Named-Ranges.xlsm<\/span><\/a><\/p>\n<p class=\"line-two\">\n<\/div>\n<hr \/>\n<p>For our example, these columns over here have <strong>named ranges<\/strong> defined.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Highlight all Named Ranges Using Macros In Excel\" class=\"aligncenter size-full wp-image-11706\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-01.jpg\" alt=\"Highlight all Named Ranges Using Macros In Excel\" width=\"758\" height=\"297\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-01.jpg 758w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-01-300x118.jpg 300w\" sizes=\"(max-width: 758px) 100vw, 758px\" \/><\/p>\n<p>Here are the named ranges, you can quickly view them via\u00a0<em><strong><a class=\"wpil_keyword_link\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/top-excel-formulas-function-examples-to-get-better-at-microsoft-excel\/\" target=\"_blank\" rel=\"noopener\" title=\"Formulas\" data-wpil-keyword-link=\"linked\">Formulas<\/a> &gt; Defined Names &gt; Name Manager<\/strong><\/em><em>:<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Highlight all Named Ranges Using Macros In Excel\" class=\"aligncenter size-full wp-image-11707\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-01b.jpg\" alt=\"Highlight all Named Ranges Using Macros In Excel\" width=\"551\" height=\"565\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-01b.jpg 551w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-01b-293x300.jpg 293w\" sizes=\"(max-width: 551px) 100vw, 551px\" \/><\/p>\n<p><span style=\"color: #ff0000\"><strong>STEP 1:<\/strong><\/span>\u00a0Go to\u00a0<em><strong>Developer &gt; Code &gt; Visual Basic<\/strong><\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-10906 aligncenter\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/01\/How-to-Insert-Multiple-Columns-01.jpg\" alt=\"\" width=\"816\" height=\"139\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/01\/How-to-Insert-Multiple-Columns-01.jpg 816w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/01\/How-to-Insert-Multiple-Columns-01-300x51.jpg 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/01\/How-to-Insert-Multiple-Columns-01-768x131.jpg 768w\" sizes=\"(max-width: 816px) 100vw, 816px\" title=\"\"><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000\"><strong>STEP 2:<\/strong><\/span>\u00a0Paste in your code and\u00a0<strong>Select Save<\/strong>. Close the window afterwards.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Highlight all Named Ranges Using Macros In Excel\" class=\"aligncenter size-full wp-image-11708\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-02.jpg\" alt=\"Highlight all Named Ranges Using Macros In Excel\" width=\"1029\" height=\"373\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-02.jpg 1029w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-02-300x109.jpg 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-02-1024x371.jpg 1024w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-02-768x278.jpg 768w\" sizes=\"(max-width: 1029px) 100vw, 1029px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000\"><strong>STEP 3:\u00a0<\/strong><\/span>Let us test it out!<\/p>\n<p>Open the sheet containing the data. Go to\u00a0<em><strong>Developer &gt; Code &gt; Macros<\/strong><\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Unmerge All Cells Using Macros In Excel\" class=\"aligncenter size-full wp-image-11245\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Unmerge-Cells-02.jpg\" alt=\"Unmerge All Cells Using Macros In Excel\" width=\"854\" height=\"142\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Unmerge-Cells-02.jpg 854w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Unmerge-Cells-02-300x50.jpg 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Unmerge-Cells-02-768x128.jpg 768w\" sizes=\"(max-width: 854px) 100vw, 854px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Make sure your <a class=\"wpil_keyword_link\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/101-excel-macros-examples\/\" target=\"_blank\" rel=\"noopener\" title=\"macro\" data-wpil-keyword-link=\"linked\">macro<\/a> is selected. Click <strong>Run<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Highlight all Named Ranges Using Macros In Excel\" class=\"aligncenter size-full wp-image-11709\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-03.jpg\" alt=\"Highlight all Named Ranges Using Macros In Excel\" width=\"372\" height=\"363\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-03.jpg 372w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-03-300x293.jpg 300w\" sizes=\"(max-width: 372px) 100vw, 372px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>With just one click, <strong>all of the named ranges are now highlighted<\/strong>!<\/p>\n<p><span style=\"color: #0000ff\"><strong>\u00a0<img loading=\"lazy\" decoding=\"async\" title=\"Highlight all Named Ranges Using Macros In Excel\" class=\"aligncenter size-full wp-image-11710\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-04.jpg\" alt=\"Highlight all Named Ranges Using Macros In Excel\" width=\"756\" height=\"297\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-04.jpg 756w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Highlight-all-Named-Ranges-04-300x118.jpg 300w\" sizes=\"(max-width: 756px) 100vw, 756px\" \/><\/strong><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #0000ff\"><strong>How to Highlight all Named Ranges Using Macros In Excel<\/strong><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/100-66.html\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13266\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/10\/101-Macros-Book.png\" alt=\"101 Macros Book\" width=\"1200\" height=\"628\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/10\/101-Macros-Book.png 1200w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/10\/101-Macros-Book-300x157.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/10\/101-Macros-Book-1024x536.png 1024w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/10\/101-Macros-Book-768x402.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" title=\"\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have a lot of named ranges in your worksheet, and you want to see which ones are there quickly? You can quickly highlight all named ranges using Excel Macros! Make sure your Excel has the Developer Tab enabled following\u00a0this tutorial. I explain how you can do this below step by step! What does [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":18003,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cos_headline_score":0,"cos_seo_score":0,"cos_headline_text":"Highlight all Named Ranges Using Macros In Excel","cos_headline_has_been_analyzed":false,"cos_last_analyzed_headline":[],"om_disable_all_campaigns":false},"categories":[56,642],"tags":[106],"acf":[],"_links":{"self":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/11252"}],"collection":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/comments?post=11252"}],"version-history":[{"count":0,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/11252\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media\/18003"}],"wp:attachment":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media?parent=11252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/categories?post=11252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/tags?post=11252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}