How to highlight all named ranges in Excel?
For some purpose, in Excel, we may always create some range names for a range of cells. Sometimes, we want to know where the named ranges are in the whole workbook and highlight them. The simplest way for us is to click the range names from the Name Box to select the range and fill color to it. But, if there are lots of named ranges in the workbook, this method will be time-consuming. How could we highlight all of the named ranges in Excel at once?
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
Here is a code to highlight all the named ranges in a workbook, you can do as this:
1. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and paste the following code in the Module Window.
VBA code: Highlight all named ranges in Excel
Sub HighlightRange() 'Update 20140317 Dim xName As Name Dim Rng As Range On Error Resume Next For Each xName In Application.ActiveWorkbook.Names Set Rng = xName.RefersToRange Rng.Interior.ColorIndex = 6 Next End Sub
3. Then press F5 key to execute this code, and all the named ranges have been highlighted with yellow color in the whole workbook.
1. If you want to fill the named ranges with other colors, you just need to change the ColorIndex = 6 as you like.
2. After applying this code, all the original color in the named ranges are canceled and covered by this new color.