+ Reply to Thread
Results 1 to 7 of 7

2 Named Ranges For 1 Drop Down List

  1. #1
    Registered User
    Join Date
    07-05-2019
    Location
    USA
    MS-Off Ver
    2010
    Posts
    157

    2 Named Ranges For 1 Drop Down List

    Hi,

    I have 2 named ranges:

    Labor_Code
    Material_Code

    Can these be combined for a data validation list?

    Thanks,
    bj

  2. #2
    Registered User
    Join Date
    07-05-2019
    Location
    USA
    MS-Off Ver
    2010
    Posts
    157

    Re: 2 Named Ranges For 1 Drop Down List

    Hi,

    I included the workbook to maybe clarify. The sheet Invoice Data has cells in red that I need to enter the codes from either the Labor sheet or the Materials sheet.

    Thank you

  3. #3
    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: 2 Named Ranges For 1 Drop Down List

    You can only have 1 name in each DV cell.
    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

  4. #4
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,004

    Re: 2 Named Ranges For 1 Drop Down List

    As a workaround:
    You would need a helper column to populate values from both ranges into 1 column & then use it as the source of the DV.
    And to automate the populating process (when data in both ranges change) you can use 'Worksheet_Change' event, it means you'll need VBA.

  5. #5
    Registered User
    Join Date
    07-05-2019
    Location
    USA
    MS-Off Ver
    2010
    Posts
    157

    Re: 2 Named Ranges For 1 Drop Down List

    Thank you I will appreciate any other options I want to keep this workbook free of VBA.

  6. #6
    Registered User
    Join Date
    07-05-2019
    Location
    USA
    MS-Off Ver
    2010
    Posts
    157

    Re: 2 Named Ranges For 1 Drop Down List

    Hello Everyone,

    I was able to figure this out using formulas and wanted to share. I created a table (Code List) on another sheet that has the 2 dynamic ranges into one column. I then used that table column as my data validation.

    The formula for the table first cell then dragged down so there are no N/A's:

    =IFERROR(LOOKUP(2,1/(COUNTIF($B$2:B2,Table1[Code])=0),Table1[Code]),LOOKUP(2,1/(COUNTIF($B$2:B2,Table2[Code])=0),Table2[Code]))

    This is dynamic so if I add more Labor or Materials codes the Code List adds the new entries which in turn expands the data validation list.

    I hope this may help others.

  7. #7
    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: 2 Named Ranges For 1 Drop Down List

    Thanks for the feedback and sharing how you did this.

+ 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. Named Ranges don't show up in drop-down list
    By hds in forum Excel General
    Replies: 15
    Last Post: 10-16-2018, 06:26 PM
  2. [SOLVED] Drop down list using combo box and dynamic named ranges
    By Pauly K in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-21-2017, 06:11 AM
  3. Drop down list of named ranges multiplied by a cell...
    By jimsake01 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-08-2015, 01:55 PM
  4. Define only 2 named ranges from a list of named ranges...
    By abhi900 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-29-2014, 04:20 AM
  5. Replies: 4
    Last Post: 06-11-2012, 06:17 PM
  6. Drop down lists/Named ranges
    By creed1101 in forum Excel General
    Replies: 1
    Last Post: 09-07-2011, 09:31 AM
  7. Drop-down-list with Named ranges
    By Chootje in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2006, 07:55 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