Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding named ranges
I have a list of range names that are in my workbook listed on Sheet1 and I
want to determine if these range names are referenced anywhere in the workbook. This is what I have so far: Sub FindRange() Dim LastRow Dim rangename Dim CurBook Dim i Dim datasheet datasheet = "Sheet1" CurBook = Application.ActiveWorkbook.Name LastRow = Worksheets(datasheet).Cells(Rows.Count, "a").End(xlUp).row For i = 2 To LastRow rangename = Workbooks(CurBook).Worksheets(datasheet).Range("a" & i).Value Debug.Print rangename 'How do I find if this range name is used in the workbook? 'If used put "YES" in C&i Workbooks(CurBook).Worksheets(datasheet).Range("c" & i).Value = "YES" 'If not used, put "NO" in C&i Workbooks(CurBook).Worksheets(datasheet).Range("c" & i).Value = "NO" Next End Sub Thanks in advance, Barb Reinhardt |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
FINDING A NAMED TAB | Excel Discussion (Misc queries) | |||
Like 123, allow named ranges, and print named ranges | Excel Discussion (Misc queries) | |||
named ranges - changing ranges with month selected | Excel Programming | |||
Finding all Similarly Named Ranges? | Excel Programming | |||
Named ranges | Excel Programming |