+ Reply to Thread
Results 1 to 9 of 9

Dynamic named range

  1. #1
    Registered User
    Join Date
    05-02-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    23

    Question Dynamic named range

    I created a table in Excel 2010 with the name of several teams (in column B) and the names of the employees (in column C).
    I would like to create named ranges of the employees where the name of the team is identical.
    E.g.
    Column B Column C
    VVM John
    VVM Roy
    VVM Linda
    TZ Jack
    TZ Carol
    etcetera.
    The first named range's name should be Team_VVM (referring to John, Roy and Linda).
    The second named range's name should be Team_TZ (referring to Jack and Carol).
    If Teammembers are added, the named range names should dynamically change.

    Thanks for the help.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Dynamic named range

    This would work for Team_VVM:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula to be entered in the "Refers to:" section of the Name Manager (Press Ctrl + F3 to bring that up).

    Amend instances of Sheet1 to the actual sheet name.

    Amend VVM to TZ for the next team etc.

    It does rely on the teams being grouped together in the list rather than all mixed up.

    BSB
    Last edited by BadlySpelledBuoy; 06-30-2016 at 08:18 AM.

  3. #3
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: Dynamic named range

    Hi rgsbouma,

    The attached should cover what you're looking to achieve.

    Regards,

    Snook
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-02-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    23

    Question Re: Dynamic named range

    Thanks, that works brilliantly.
    The next challenge is to use this dynamic range in a data validation.
    When I select the team in column B (e.g. VVM), a Vlookup searches the table (lookup_Team) below:
    Column A Column B
    VVM ddl_Team_VVM
    TZ ddl_Team_TZ

    However, the =INDIRECT(VLOOKUP($A2,lookup_Team,2,false)) function as source if the data validation results in am error.
    I do not understand why.

    Please advise.

  5. #5
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: Dynamic named range

    Hi rgsbouma,

    Unfortunately it would appear (I never knew this) that Excel has an issue with using the INDIRECT function in data validation's with a dynamic range.
    I was having the same problem as you and googled it and there are multiple sites highlighting the same issue.

    I tried to find a solution but couldn't get any of them to work. This seemed like the most promising workaround (Link).

    Could anyone else assist rgsbouma?

    Regards,

    Snook

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Dynamic named range

    Are you creating a "dependent data validation list"?
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Dynamic named range

    I don't understand what you're describing in post #4.

    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Registered User
    Join Date
    05-02-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Dynamic named range

    Hi Biff and Vladimir,

    Yes I am trying to create a dependent Data Validation. Based on the selection in another cell, the Data Validation should show the corresponding list. The solution in post #2 does create the dynamic range with the correct employee names. Now my challenge is the show these employee names in a data validation.

    I tried the Daily Dose of Excel solution of the UDF DINDIRECT, but that returns a #VALUE! error (http://dailydoseofexcel.com/archives...ynamic-ranges/)

    Maybe you have any other suggestions?

    I am grateful for any help offered.
    Attached Files Attached Files
    Last edited by rgsbouma; 07-01-2016 at 02:57 AM.

  9. #9
    Registered User
    Join Date
    05-02-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Dynamic named range

    Hi Biff and Vladimir,

    I added an attachment with Sample data.
    Last edited by rgsbouma; 07-01-2016 at 02:57 AM.

+ 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. Replies: 0
    Last Post: 03-08-2016, 02:25 PM
  2. [SOLVED] dynamic named range not populating combo box list if range = single cell
    By HeyInKy in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-24-2014, 05:27 PM
  3. Dynamic / Named Print Range To Include Another Range of Cells
    By thekrakenwakes in forum Excel General
    Replies: 0
    Last Post: 07-25-2014, 07:52 AM
  4. [SOLVED] creating a named range taking the avg. to date of a dynamic range.
    By siggisigg in forum Excel General
    Replies: 1
    Last Post: 07-15-2014, 08:58 AM
  5. [SOLVED] Dynamic Named Range to Auto-Populate another range based on criteria
    By BeachRock in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-24-2014, 06:46 PM
  6. [SOLVED] Dynamic Named Range Help - Range Based on Values in Column
    By Filibuster in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-03-2012, 11:13 AM
  7. Named ranges-Should I use a dynamic named range
    By foseco in forum Excel General
    Replies: 4
    Last Post: 06-11-2009, 03:56 PM

Tags for this Thread

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