[Fixed!] Drop Down List Ignore Blank Not Working in Excel

What Is Drop Down List?

A drop-down list allows the user to choose text or numbers from a list rather than typing them into a cell.

To insert a drop-down list:

  • Select the cells where the drop-down lists are needed.
  • Go to the Data tab.
  • Click the Data Validation option in the Data Tools group.
  • Check the List option in the Validation criteria in the Data Validation window.

Excel Drop Down List Ignore Blank Not Working: 3 Solutions

Whenever we try to create a drop-down list in a range that contains blank cells, the list will include an empty option. Attempting to use the Ignore Blank option will not prevent this. In this article we will demonstrate three solutions to remove these empty cells from the drop-down menu.

To demonstrate our methods, we’ll use a sample dataset containing two columns titled Product and Area.excel drop down list ignore blank not working

Notes

We used the Microsoft Excel 365 version here, but you can use any version available to you.


Reason – Source Range of Drop Down List Contains Blank Cells

When there are empty cells in the Source Range, after creating a drop-down list using the Data Validation feature as described above, some items remain blank while displaying the list.

Reason: Source Range of  Drop Down List Contains Blank Cells


Solution 1 – Using FILTER and OFFSET Functions

We can use the FILTER and OFFSET functions to remove the empty cells from a drop-down menu.

Steps:

  • Create a column titled Select Area like the below one.

Utilize FILTER and OFFSET Functions to Eliminate Blank Cells in Excel Drop Down List

  • In cell D5, enter the following equation:

=FILTER(C5:C10,C5:C10<>"")

  • Press Enter or Tab to return the result.

Utilize FILTER and OFFSET Functions to Eliminate Blank Cells in Excel Drop Down List

  • Navigate to the Formulas tab and click on the Name Manager icon.

Utilize FILTER and OFFSET Functions to Eliminate Blank Cells in Excel Drop Down List

  • In the Name Manager window that appears, click New.

The New Name window will open.

  • Enter the name, in this case DropDownWithoutBlank.
  • Enter the following formula in the Refers to box:

=OFFSET(OFFSETFunction!$D$5,0,0,COUNTA(OFFSETFunction!$D$4:$D$10)-1,1)

  • Click OK.

  • Choose Close from the Name Manager window.

  • Select cell B13.

  • Go to the Data tab and click on the Data Validation symbol.

Utilize FILTER and OFFSET Functions to Eliminate Blank Cells in Excel Drop Down List

The Data Validation window will pop up.

  • From the Settings tab, choose List in the Allow box.
  • In the Source box, enter an Equal sign followed by the Range name created earlier.
  • Click OK.

After expanding it, the drop-down list will display without the blanks.

Utilize FILTER and OFFSET Functions to Eliminate Blank Cells in Excel Drop Down List

Read More: How to Remove Used Items from Drop Down List in Excel


Solution 2 – Using the Find & Select Feature

Steps:

  • Make another column named Select Area.
  • Select cell E5.

Delete Blank Cells in Excel Drop Down List Using Find & Select Feature Instead of Ignore Blank

  • Navigate to the Data tab and click on the Data Validation icon.

Delete Blank Cells in Excel Drop Down List Using Find & Select Feature Instead of Ignore Blank

The Data Validation dialog box will appear.

  • From the Settings tab, choose List in the Allow section.
  • Input an Equal sign followed by the $C$5:C$10$ range and click OK.

After expanding it, the drop-down will display a drop-down with some empty cells.

Delete Blank Cells in Excel Drop Down List Using Find & Select Feature Instead of Ignore Blank

  • To eliminate those, select the C5:C10 range.

  • Go to the Home tab and click on Editing.

Delete Blank Cells in Excel Drop Down List Using Find & Select Feature Instead of Ignore Blank

  • From the Editing group, choose Find & Select.

Delete Blank Cells in Excel Drop Down List Using Find & Select Feature Instead of Ignore Blank

  • Pick the Go To Special option.

  • From the Go To Special window, check Blanks and click OK.

The outcome will look like the below.

  • Right-click on any selected empty cell and from the Context menu, choose Delete.

  • Check the Shift cells up option and click OK.

  • The desired outcome will be produced.

Delete Blank Cells in Excel Drop Down List Using Find & Select Feature Instead of Ignore Blank


Solution 3 – Using Excel VBA Code

Steps:

  • Make another column titled Select Area.

Run Excel VBA Code to Extract Empty Cells from Drop Down List

  • Go to the Developer tab and choose the Visual Basic symbol.

Run Excel VBA Code to Extract Empty Cells from Drop Down List

  • Click on Insert >> Module.

Insert Module

  • Enter the code below in the Module box that opens:
Sub DropDownWithNoBlank()
    Range("D5").Select
    ActiveCell.Formula2R1C1 = "=FILTER(RC[-1]:R[5]C[-1],RC[-1]:R[5]C[-1]<>"""")"
    ActiveWorkbook.Names.Add Name:="DropDownWithoutBlankUsingExcelVBA", _
        RefersToR1C1:= _
        "=OFFSET(OFFSETFunction!R5C4,0,0,COUNTA(OFFSETFunction!R4C4:R10C4)-1,1)"
    Range("B13:D13").Select
    With Selection.Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
        xlBetween, Formula1:="=DropDownWithoutBlankUsingExcelVBA"
        .IgnoreBlank = True
        .InCellDropdown = True
        .ShowInput = True
        .ShowError = True
    End With
End Sub
  • Press  F5  or click on the Run button to run the code.

The drop-down displays without blanks.

Run Excel VBA Code to Extract Empty Cells from Drop Down List

Read More: Hide or Unhide Columns Based on Drop Down List Selection in Excel


Download Practice Workbook


Related Articles


<< Go Back to Excel Drop-Down List | Data Validation in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Lutfor Rahman Shimanto
Lutfor Rahman Shimanto

Lutfor Rahman Shimanto, BSc, Information Technology, Jahangirnagar University, Bangladesh, has worked with the ExcelDemy project for over a year. He has written 50+ articles and provided solutions of 100+ comments for ExcelDemy. Currently, he works as an Excel & VBA Developer and provides support and solutions in the ExcelDemy Forum. He has solved 100+ ExcelDemy Forum problems. His work and learning interests are in developing various Excel & VBA and Desktop applications. Outside of work, he enjoys Chess... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo