+ Reply to Thread
Results 1 to 5 of 5

How do you get rid of blanks in a drop down list?

  1. #1
    Registered User
    Join Date
    03-23-2008
    Posts
    1

    How do you get rid of blanks in a drop down list?

    Hi
    I have a drop down list which uses =if() to pick students from a separate sheet and this drop down list has got blanks in it because the students are from separate years for example you have year 7 then 8 then 7 then 9 then 8 then 10 then 7.
    So my drop down list for all year 7's is something like this
    John
    blank
    bob
    blank
    blank
    smith
    Is there a way i can get rid of these blanks ?
    Because i need a drop down list that will only show students from one year not so many

    In simple words need a formula to get rid blanks tried counta blanck but since i already got a formula there wont work

    Help will be much appreciated

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Try this array formula in B1 to get rid of the blanks, this will consolidate the list, then you could use this column for your data validation.

    Please Login or Register  to view this content.
    enter the formula with Ctrl+Shift+Enter and auto-fill downwards
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    11-26-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: How do you get rid of blanks in a drop down list?

    The above is great if your array starts at A1 but as soon as the array is move to a different row, the formula stops working. What needs to change in the formula if say the array is $A$2:$A$31?

    Thanks

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How do you get rid of blanks in a drop down list?

    Quote Originally Posted by tonymq View Post
    as soon as the array is move to a different row, the formula stops working
    Try this...

    =IF(ISNUMBER(SMALL(IF(A$1:A$30<>"",ROW(A$1:A$30)-MIN(ROW(A$1:A$30))+1),ROW())),INDEX(A$1:A$30,SMALL(IF(A$1:A$30<>"",ROW(A$1:A$30)-MIN(ROW(A$1:A$30))+1),ROW(1:1))),"")


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: How do you get rid of blanks in a drop down list?

    It is very simple to add or edit drop down list in excel. Check out the below link and follow the steps,

    http://snpinfotech.wordpress.com/201...list-in-excel/

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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