+ Reply to Thread
Results 1 to 2 of 2

Custom data validation drop down lists

  1. #1
    Registered User
    Join Date
    02-05-2017
    Location
    New Zealand
    MS-Off Ver
    2016
    Posts
    6

    Custom data validation drop down lists

    Hi all,

    I'm trying to create an Excel program with drop down lists that can be easily customised by each user (and assuming no or very basic Excel knowledge on the part of each user). At the moment I have placed tick boxes via form control next to each of the possible options to include in the drop down lists. I've then linked each check box to a cell to get a TRUE/FALSE result and then used an IF statement to either display the option or a blank depending on whether or not the box is ticked (e.g. IF(A7,A1,"").

    The problem is that when I go to make a drop down list in data validation Excel doesn't treat these cells as blanks so I get a drop down list with big spaces in it - does anyone know how I can resolve this issue?

    Thanks in advance,

    Laura

  2. #2
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Custom data validation drop down lists

    Quote Originally Posted by Basil85 View Post
    The problem is that when I go to make a drop down list in data validation Excel doesn't treat these cells as blanks so I get a drop down list with big spaces in it - does anyone know how I can resolve this issue?
    If I'm understanding your issue correctly, then you can get around the spaces using a named range. If your data is in column A, create a helper column that automatically shuffles all of the spaces to the bottom. In (for instance) D1, use the following formula, array-entered with Ctrl + Shift + Enter instead of Enter:

    =IFERROR(INDEX($A$1:$A$200,SMALL(IF($A$1:$A$200<>"",ROW($A$1:$A$200)),ROW(1:1))),"")

    Then fill down as far as necessary. You can hide the helper column if it's unseemly. It'll automatically update as column A is altered, so you shouldn't need to actively use it. Once that's done, use the formula below as the "Refers To" formula when creating a named range to create a named range based on the helper column:

    =OFFSET(Sheet1!$D$1,0,0,COUNTA(Sheet1!$D$1:$D$200),1)

    Finally, use that named range as your data validation source. If your data stretches beyond row 200, then replace all of the 200s in the formulas with something more appropriate. See the attachment for a simplified look at how it works:
    Attached Files Attached Files

+ 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] Data Validation - drop-down lists
    By Trebor777 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-09-2016, 11:32 AM
  2. Replies: 2
    Last Post: 11-18-2015, 09:37 AM
  3. [SOLVED] data validation lists - drop down lists too small
    By reglook0736 in forum Excel General
    Replies: 3
    Last Post: 04-24-2015, 12:49 PM
  4. [SOLVED] Custom Data Validation Lists
    By vadrev in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2014, 04:21 PM
  5. Excel 2008 : Data Validation Drop Down Lists
    By irisorio in forum Excel General
    Replies: 2
    Last Post: 03-02-2011, 09:46 PM
  6. data validation and drop down lists
    By LewR in forum Excel General
    Replies: 3
    Last Post: 03-14-2006, 02:55 PM
  7. data validation - Drop Down Lists
    By Annie in forum Excel General
    Replies: 8
    Last Post: 07-28-2005, 09:05 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