+ Reply to Thread
Results 1 to 6 of 6

Check if cell is a named range

  1. #1
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Check if cell is a named range

    Hi,

    I'd like to check if a cell is in a named range. Catch is, I don't know in advance what the named range will be (these are defined earlier). My function is as follows :


    Please Login or Register  to view this content.
    Thanks,
    amphi

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Check if cell is a named range

    I don't know in advance what the named range will be (these are defined earlier)
    I'm assuming this means you don't know the cells the range will cover, but presumably you do know the name of the range. If so, try this. Change "named_range" to whatever the actual name of the range is.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Re: Check if cell is a named range

    Thanks walruseggman. The issue I have is that I don't have the specific "named_range" as I defined the names in a previous loop. What I do have is "Quote14" "Quote23" "Quote36" "Quote42" etc.

    Edit: I'll solve the named_range issue with Range("Quote" & Column.Count)
    Last edited by amphinomos; 05-27-2015 at 11:43 AM.

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Check if cell is a named range

    Hi amphinomos

    Here's some Code I have in my toolbox...perhaps you can adapt it
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  5. #5
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Re: Check if cell is a named range

    Thanks ! Hadn't thought about looping through the names collection !

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Check if cell is a named range

    You're welcome...glad I could help. Thanks for the Rep.

+ 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. Check if a named range exists
    By Hein in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2010, 09:16 AM
  2. Check For Local (WrkSht) Named Range
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-18-2009, 02:10 PM
  3. Check if a value is a named range
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2008, 06:51 AM
  4. Check if cell is part of a named range
    By RobynC in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2008, 02:31 PM
  5. [SOLVED] Check if named range exists!
    By steve_doc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2006, 07:00 PM

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