+ Reply to Thread
Results 1 to 8 of 8

Dynamically call named ranges in excel

  1. #1
    Registered User
    Join Date
    02-18-2004
    Posts
    55

    Dynamically call named ranges in excel

    I need some help understanding why I cannot dynamically call a named range using a formula. I’ve attached an example spreadsheet as an example.

    Inside the spreadsheet, I have a master table that is a named range. (Master_Table) Inside the master range are sub-ranges. (CLT3_Table and FLL2_Table) Depending on what sub-range is chosen from the dropdown, I would like to be able to lookup specific values within the range.

    The challenge that I’m having is being able to dynamically call the site-specific named range through using either vlookup or (Index/Match). In the attached spreadsheet, what I need help with is the line labeled with a RED #5. This formula (Cell c26) needs to be able to pull the alias based on the site and port that are chosen using the (2) dropdowns. I can’t for the life of me figure out what I’m doing wrong and could really use some assistance. Thanks.
    ExampleA.xlsx

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Dynamically call named ranges in excel

    i cant see any dynamic named range,where is it?
    do you mean
    =VLOOKUP(M3,INDIRECT(VLOOKUP(M7,Site_Table,2,FALSE)),10,FALSE)
    Last edited by martindwilson; 09-05-2013 at 06:11 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    02-18-2004
    Posts
    55

    Re: Dynamically call named ranges in excel

    Martin,
    Please read the original post. I was asking how to dynamically CALL a named range. Not how to use a dynamic named range. Hopefully that makes sense, if I'm missing something please let me know.

  4. #4
    Registered User
    Join Date
    02-18-2004
    Posts
    55

    Re: Dynamically call named ranges in excel

    Martin. I just realized your post had a formula to test. I didn't notice that on my phone. One I get in front of PC I will try that out. Thanks.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Dynamically call named ranges in excel

    Perhaps if you explained what you are trying to do, rather than how you think you should be doing it, we could understand better what you want?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    02-18-2004
    Posts
    55

    Re: Dynamically call named ranges in excel

    Quote Originally Posted by FDibbins View Post
    Perhaps if you explained what you are trying to do, rather than how you think you should be doing it, we could understand better what you want?

    I’m not sure how much better I can describe what I’m trying to do, but I’ll try my best.
    Basically, I have an extremely long table with data in it similar to that posted in the example spreadsheet. This table contains switch port data for 26 different cities (4500 Ports). The spreadsheet is being used to assist with port zoning, port naming, and load balancing across the environment.

    What I’m trying to accomplish is an easy way to query ports information based on the input values of SiteID and Port Number.

    Open the example spreadsheet. In the spreadsheet there are (2) drop downs. One chooses the Site, and the other chooses the Port. With that, I need to be able to pull the port alias and other relevant information, based on those two selections.

    It seems the problem is that it’s not possible to call a named range through a cell reference. I’m trying to confirm that and if so, find a way around it. For example, in the spreadsheet, entering a simple formula such as =MATCH(M7,C23) returns as N/A. whereas, the formula =MATCH(2,CLT3_IDs), returns the value "2". (NOTE: Look at name manager for more clarification)
    it doesn’t appear that calling a named range by using that name through a cell reference is possible. I need to find a way around that problem.
    Last edited by pjw23; 09-05-2013 at 09:24 PM.

  7. #7
    Registered User
    Join Date
    02-18-2004
    Posts
    55

    Re: Dynamically call named ranges in excel

    Quote Originally Posted by martindwilson View Post
    i cant see any dynamic named range,where is it?
    do you mean
    =VLOOKUP(M3,INDIRECT(VLOOKUP(M7,Site_Table,2,FALSE)),10,FALSE)
    martin, this at least returns a value, but it doesn't change as my inputs change. Any other ideas.

  8. #8
    Registered User
    Join Date
    02-18-2004
    Posts
    55

    Re: Dynamically call named ranges in excel

    Quote Originally Posted by martindwilson View Post
    i cant see any dynamic named range,where is it?
    do you mean
    =VLOOKUP(M3,INDIRECT(VLOOKUP(M7,Site_Table,2,FALSE)),10,FALSE)
    Martin,

    Based on your formula, I made it work....THANK YOU...
    =VLOOKUP(M7,INDIRECT(VLOOKUP(M3,Site_Table,2,FALSE)),10,FALSE)
    I've never used indirect before and need to understand it better, but it's working...thanks again.

+ 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] Dynamically call class method
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-16-2013, 05:45 PM
  2. [SOLVED] Auto updating Charts with Dynamically named Ranges
    By Xiophoid in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 03-19-2013, 01:18 PM
  3. How to call a function from a ComandButton on an excel sheet created dynamically
    By ravikanth180 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2013, 04:25 AM
  4. Splitting column dynamically into named ranges
    By cad1llac in forum Excel General
    Replies: 2
    Last Post: 09-11-2011, 05:18 PM
  5. Replies: 1
    Last Post: 01-03-2006, 06:23 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