LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FINDING A NAMED TAB twinpat Excel Discussion (Misc queries) 4 May 19th 09 07:21 PM
Like 123, allow named ranges, and print named ranges WP Excel Discussion (Misc queries) 1 April 8th 05 06:07 PM
named ranges - changing ranges with month selected gr8guy Excel Programming 2 May 28th 04 04:50 AM
Finding all Similarly Named Ranges? Grant Reid Excel Programming 4 May 5th 04 02:24 PM
Named ranges Ron de Bruin Excel Programming 1 April 20th 04 03:56 PM


All times are GMT +1. The time now is 06:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"