+ Reply to Thread
Results 1 to 8 of 8

Dynamic Drop Down List - exclude blanks

  1. #1
    Registered User
    Join Date
    08-17-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Dynamic Drop Down List - exclude blanks

    Hi. I am trying to create a drop down list that automatically excludes blank cells.

    For Excel 2010, the following works no problem when included in the Define Name window:

    =formula!$U$2:INDEX($U$2:$U$60,COUNTIF($U$2:$U$60,"?*")

    However, in Excel 2007, the same formula does not work. For more information on how I am getting here: http://www.youtube.com/watch?v=6PcF04bTSOM

    Go to the 18:30 mark.

    Thank you,

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Dynamic Drop Down List - exclude blanks

    Do you need to include the sheetname, formula, in the INDEX and COUNTIF sections?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    08-17-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Dynamic Drop Down List - exclude blanks

    Correct, I am sorry. I did not copy it from the defined name window where those things were added.

    =formula!$U$2:INDEX(Ref_Employee_SRC!$U$2:$U$60,COUNTIF(Ref_Employee_SRC!$U$2:$U$60,"?*"))

    Note: I have looked into the offset function. I really don't want to create a new list somewhere else.

    My source list is constantly changing and I have many dynamic drop down lists to create. Having one arrary to sort my data and then another array to delete the spaces would add a high level of complexity.

    thank you,

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Dynamic Drop Down List - exclude blanks

    But now you are starting at sheet called formula U2 and ending in sheet Ref_Employee_SRC. That mix can't happen.

  5. #5
    Registered User
    Join Date
    08-17-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Dynamic Drop Down List - exclude blanks

    OK, I see your point. That whole formula is used in the Name Manager window. It is not used in the cell.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Dynamic Drop Down List - exclude blanks

    if you put this in the name manager:

    =Ref_Employee_SRC!$U$2:INDEX(Ref_Employee_SRC!$U$2:$U$60,COUNTIF(Ref_Employee_SRC!$U$2:$U$60,"?*"))

    it should work, if U2:U60 contain text and formula nulls....

  7. #7
    Registered User
    Join Date
    08-17-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Dynamic Drop Down List - exclude blanks

    Book1.xlsx

    I am trying to break down the problem. I still can't get things to work. Everything is fine until I enter a dynamic range into the name manager.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Dynamic Drop Down List - exclude blanks

    You can't use INDIRECT references in Data Validation with Dynamic Named Range... so we will need to employ method described here at the bottom: Using Dynamic Lists


    So, first change reference for the Employee_AC to just =Ref_Employee_SRC!$C$1

    then create a named range called Employee_AC_Col and make it the whole column = =Ref_Employee_SRC!$C:$C

    Then for data validation, use List and =OFFSET(INDIRECT($F7),1,0,COUNTIF(INDIRECT($F7&"_Col"),"?*")-1)

+ 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