+ Reply to Thread
Results 1 to 9 of 9

Make list and ignore empty values?

  1. #1
    Registered User
    Join Date
    10-27-2021
    Location
    Vienna
    MS-Off Ver
    2019
    Posts
    29

    Make list and ignore empty values?

    Hello,

    is it possible to make a list (via data validation) and ignore all empty values / cells?
    find attached an example what i mean)

    When i open the drop-box in cell C1 i also get the empty cells in the list.

    I found a solution with SORT / UNIQUE / FILTER - but this only works with the newer versions Excel 365 and Excel 2021.

    Is there also a solution for that using Excel 2019 or Excel 2016?
    Attached Files Attached Files
    Last edited by Rapid1898; 11-15-2021 at 07:57 AM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Make list and ignore empty values?

    I am assuming that this is just a piece of a bigger puzzle. In my example, I put the values in an Excel table and built a pivot table from them. The key point is the pivot table. You can build it from a hard-coded range if you prefer.

    One of the things about pivot tables is that they can produce a sorted, unique list of values. I've shown the pivot table in column C. When the values are sorted in a pivot table, (blank) comes out on the bottom.

    The next step is to overlay the results of the pivot table with a named, dynamic range. To do this click in cell C2 and select Formulas > Name Manager.

    Select New and in the Name box type in a name such as MyList. Then in the refers to box type the following formula: =OFFSET(Tabelle1!$C$2,0,0,COUNTA(Tabelle1!$C:$C)-2,1)

    Intellisense will fill in the "Tabelle1!$C$2" when you select that cell and the "Tabelle1!$C:$C" when you select that column. The rest you will have to type yourself.

    Here is what the offset formula means =Offset(Start Here, Go down this many rows, Go right this many columns, Give me a range x rows deep and y columns wide).

    So in our case, this means start in cell C2, go down zero rows and right 0 columns. So we are still in cell C2. then give me a range COUNTA(C:C)-2 rows deep and 1 column wide. I subtracted the 2 from the COUNTA because we do not want to "count" the header or the (blank).

    With the values you have, this equates to Cells C2:C7. As values are added or deleted this range will grow and shrink accordingly.

    All of this is wrapped up in a named range called MyList.

    So then the validation (in Cell E1) becomes a list validation with the source being =MyList.

    The pivot table can be anywhere in the workbook, even on a hidden sheet. I put it on the same page for convenience.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,846

    Re: Make list and ignore empty values?

    In D2

    =IFERROR(INDEX($A$1:$A$10, MATCH(0, COUNTIF($D$1:D1, $A$1:$A$10&"") + IF($A$1:$A$10="",1,0), 0)), "")

    enter with Ctrl+ShifT+Enter

    D1 is blank or header ( i created named range LIST)

    This is your DV list

    List

    =LIST
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Registered User
    Join Date
    10-27-2021
    Location
    Vienna
    MS-Off Ver
    2019
    Posts
    29

    Re: Make list and ignore empty values?

    Thanks a lot for the explanation - works great!

  5. #5
    Registered User
    Join Date
    10-27-2021
    Location
    Vienna
    MS-Off Ver
    2019
    Posts
    29

    Re: Make list and ignore empty values?

    Hello - i have an additional question to this thread - so i changed the status to again -

    I tried to make an filter like described in the above answer - but it is not working as it should.
    (in column K i have the available values - in column K i make the list as described in the solution - and then make the list-element for choosing L1)

    But it only shows me the very first entry of the available values?
    Why is that?
    (as you can see i tried the same thing in the column F to H and there it works fine - but it doesn´t work in the column K-M)

    Maybe someone can me help here out again.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Make list and ignore empty values?

    In the name manager for LISTROH try this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-27-2021
    Location
    Vienna
    MS-Off Ver
    2019
    Posts
    29

    Re: Make list and ignore empty values?

    Hello - i tried to change LISTROH in the name manger as you suggest - but an error (see screenshot attached)
    Attached Images Attached Images

  8. #8
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Make list and ignore empty values?

    It is working fine with me.

    Try my sample to see if we can certify where is the problem.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-27-2021
    Location
    Vienna
    MS-Off Ver
    2019
    Posts
    29

    Re: Make list and ignore empty values?

    Thanks - now it works.
    (was a problem with the different naming between the english and german version...)

+ 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. Replies: 8
    Last Post: 08-03-2021, 07:40 AM
  2. Replies: 29
    Last Post: 11-30-2017, 04:00 PM
  3. Ignore empty columns, if checking values IF(And..
    By NeverGiveUp in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-17-2015, 03:53 PM
  4. [SOLVED] Can't make AverageIF ignore empty cells
    By Mantask in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-15-2013, 11:54 PM
  5. How to ignore empty cells when getting unique values
    By fia in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-15-2011, 07:47 PM
  6. Make Chart ignore zero values
    By jevery in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 12-02-2009, 06:55 AM
  7. Make it ignore empty fields
    By Trintrin in forum Excel General
    Replies: 1
    Last Post: 03-24-2006, 03:17 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