+ Reply to Thread
Results 1 to 6 of 6

No Blanks in List for Data Validation

  1. #1
    Registered User
    Join Date
    01-28-2023
    Location
    UK
    MS-Off Ver
    365
    Posts
    6

    No Blanks in List for Data Validation

    Hi,

    I've designed something rather complex for work that I know nobody is going to have the skill set to adjust as needed if I was to leave in the future, so I'm trying to adjust parts of it so it can flex to their needs rather than need any technical adjustment.

    I have a Data Validation list. The source may grow, but may reduce, it may grow and then reduce, and vice versa. Ideally, I would like it to only show the values up until the final value.

    I have attempted defining it within a name, but it doesn't shrink, only grows. I've attempted via a formula, something along the lines of "=IFERROR(INDEX($A$2:$A$11, SMALL(IF(NOT(ISBLANK($A$2:$A$11)), ROW($A$1:$A$10),""), ROW(A1))),"")" but this didn't work both ways either. I end up with a drop-down box with 4 entries (currently) and lots of blanks below it, which doesn't look great.

    Any advice?

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: No Blanks in List for Data Validation

    I usually do this with a list that starts in A1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    It returns a list of non-blank cells in column A, assuming there are no embedded blank cells.

    But I don't know anything about your data or what your current formula is trying to do.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    02-09-2009
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    380

    Re: No Blanks in List for Data Validation

    Use a table & reference it as a structured reference in the data validation by wrapping it in the INDIRECT function:

    Please Login or Register  to view this content.
    It will dynamically adjust as you desire with no blanks.
    If it's been helpful please mark as helpful

  4. #4
    Registered User
    Join Date
    01-28-2023
    Location
    UK
    MS-Off Ver
    365
    Posts
    6

    Re: No Blanks in List for Data Validation

    I usually do this with a list that starts in A1:
    Formula: Select Code copy to clipboard
    =OFFSET($A$1,0,0,COUNTA($A:$A))

    It returns a list of non-blank cells in column A, assuming there are no embedded blank cells.

    But I don't know anything about your data or what your current formula is trying to do.
    This works, thank you.

    I appreciate I didn't give much about the actual existing data but it's a whole can of worms so wanted to keep it generic. Again, thank you for your help!

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: No Blanks in List for Data Validation

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

    If a member helped you solve your problem, consider adding to their reputation by clicking addreputationiconsmall.jpg below their name.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: No Blanks in List for Data Validation

    I prefer
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    as it's not volatile.

    Or as you have 365, you could probably use a Filter (to a reference area). For example
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    That would also cope with embedded blanks.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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] blanks in data validation (Drop down list)
    By ahmadjumaa80 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-27-2022, 09:13 AM
  2. [SOLVED] Data Validation List Has Blanks
    By BillySpivy in forum Excel General
    Replies: 7
    Last Post: 07-08-2021, 12:35 PM
  3. [SOLVED] data validation list without blanks
    By thedunna in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-09-2019, 04:34 PM
  4. [SOLVED] List unused items from data validation list without blanks
    By L plates in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-27-2015, 09:02 AM
  5. remove blanks from data validation list
    By jame24 in forum Excel General
    Replies: 5
    Last Post: 04-27-2012, 11:44 PM
  6. [ Data Validation > List ] with Blanks
    By macky1730 in forum Excel General
    Replies: 2
    Last Post: 10-27-2010, 03:14 PM
  7. Data Validation and Blanks in List
    By GoneRural in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-26-2005, 01:05 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