I have a fairly sizeable workbook with a lot of named ranges, many of which are probably redundant which I'd like to delete. It's fairly routine to establish if a named range is used in a Formula or in any part of the VBA code within the workbook, but I can't think of a way to work out if a named range is used as the source for any data validation. Obviously I only want to delete named ranges that are not in use by any data validation rules. There is one tab in particular that I'd like to focus on that has ~1500 rows and is made up of 3 main columns that consist of various dropdowns that either look at explicit named ranges, specific regions of other workbooks, or are explicitly written out selections (e.g. Yes, No).
Is there a way to loop trough all cells in this tab to show what the validation ranges are? Ideally I'd like output displayed similarly to the table below. :
In an ideal world, if there is no validation in a cell then maybe the output could skip adding to the table, although this isn't vital. Thanks!
Is there a way to loop trough all cells in this tab to show what the validation ranges are? Ideally I'd like output displayed similarly to the table below. :
Cell Address | Data Validation |
---|---|
A1 | None |
A2 | =NamedRange1 |
A3 | ='Lookup Tab'!$S1:$S35 |
A4 | None |
A5 | Yes, No |
In an ideal world, if there is no validation in a cell then maybe the output could skip adding to the table, although this isn't vital. Thanks!