+ Reply to Thread
Results 1 to 8 of 8

How to check if named range not refer to workbook's range?

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    How to check if named range not refer to workbook's range?

    Hi,

    i want to detect if named range is not referred to workbook range directly:

    Screenshot_16.png

    in example you can see that named range was inputted via named manager and not refering to any worksheet.

    How can i do this?
    Jacek

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,015

    Re: How to check if named range not refer to workbook's range?

    You could probably just test the RefersToRange property of the name with an error handler.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: How to check if named range not refer to workbook's range?

    Try
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  4. #4
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: How to check if named range not refer to workbook's range?

    Hi Guys,

    Rory - probably?

    YasserKhalil - it will loop each time through each worksheet for each named range. i do not know if it will be fast method.

    Jacek

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: How to check if named range not refer to workbook's range?

    Try this version
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: How to check if named range not refer to workbook's range?

    oo great solution Yasser,

    thank you!
    Jacek

  7. #7
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: How to check if named range not refer to workbook's range?

    You're welcome. Glad I can offer little help

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,015

    Re: How to check if named range not refer to workbook's range?

    "probably" translates roughly to "I don't have time to test this and, given the nature of VBA there are probably exceptions, but, in theory,"

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] refer from worksheet_change event to workbook named range
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2018, 07:34 AM
  2. [SOLVED] Refer to named range in different, closed workbook
    By frsaxon in forum Excel General
    Replies: 4
    Last Post: 07-26-2018, 07:25 PM
  3. refer to range within named range
    By esbencito in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-19-2018, 06:24 AM
  4. Refer to a Workbook level named range
    By ptownbro985 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2014, 06:02 PM
  5. [SOLVED] What happens when I refer to a named range?
    By RogeratCCCC in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 04-21-2012, 04:06 PM
  6. VBA Refer to named range in different workbook
    By globalpontoon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2010, 03:20 AM
  7. [SOLVED] named range ?::how to I refer to current workbook without using its name?
    By Rajni R in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 07:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1