Bottom line: Learn a fast and easy way to search any data validation list or in-cell drop-down list with a free tool.
Skill level: Beginner
Data validation lists are a great way to control the values that are input in a cell. These drop-down lists also allow us to choose options that can drive financial models, reports, or dashboards.
- You can find my complete tutorial for setting up data validation lists here.
- Then you can learn how to make them dynamic here.
- And you can find out how to make them dependent on one another here.
However, there is no built-in way to search the validation list in Excel. It can be difficult to scroll through these lists when the drop-down contains a lot of items. There are some really cool formula based solutions to this problem, but they require a lot of setup work for each validation list in your file.
So I developed a very simple add-in that helps solve this problem…
Video Overview of List Search
Click the links below to jump down to the feature update videos.
Search Validation Lists with List Search
The List Search Add-in makes it fast and easy to search any validation list. It also works with lists of data that do not contain data validation cells.
The List Search form contains a drop-down box that loads the selected cell's validation list. The drop-down box also functions as a search box. You can type a search in the box and the results will be narrowed down as you type. This is a Google-like search and the results will include any item that contains the search term. The item does not have to start with the search term.
Once you have selected the item you are looking for, press Enter on the keyboard or press the Input Value button on the form to input the value in the selected cell.
List Search works on any cell in any workbook. There is NO special setup required. Simply select a cell, press the List Search button, and start searching the list.
List Search Options & Features
The List Search Add-in contains some features that make it super fast to do data entry and work with your lists. Press the Menu button in the List Search window to see the options.
- Select Next Cell – After pressing the Enter key or Input Value button, the cell below the active cell is selected. This behavior can be changed in the direction drop-down menu.
- Down – selects the cell below the active cell.
- Right – selects the cell to the right of the active cell.
- None – does not change the selection.
- Close – closes the List Search window.
- Paste – Copies the input value to the clipboard and pastes it to the active cell using the VBA SendKeys method. The List Search Window closes. This is the only option that retains the undo history in Excel.
- Sort Order – The drop-down list can be sorted in ascending (A-Z), descending (Z-A), or original order by pressing the toggle buttons in the options menu. This only sorts the list in the List Search window. It does not sort the data validation list in the cell.
- List Info – The Info button displays additional information about the drop-down list. It currently displays the total number of items in the list.
- Create List of Unique Values – A new button has been added that copies the contents of the drop-down list to the clipboard. You can then paste the list to any range in the workbook. This is a fast way to create a list of unique values when you use List Search on a cell that does NOT contain data validation. You can also filter the list by typing a search, then copy the filtered list to the clipboard.
IMPORTANT Note: When inputting values to the active cell, the only way to retain the Undo History is by using the Paste option in the Select Next Cell drop-down list. List Search uses macros to input the selected value, and macros typically clear the undo history in Excel when they modify the workbook. The Paste option is a workaround that uses the SendKeys method to copy and paste the selected value. This mimics what the user would do to copy/paste, and does NOT clear the Undo history in Excel.
Works on Lists Without Data Validation
List Search works on cells that do not contain data validation too. If you select a cell that does NOT contain data validation and open List Search, the drop-down will be loaded with a list of unique items from the column of the selected cell.
This is similar to pressing Alt+Down Arrow in a cell to see a list of values in that column. However, the list does not need to be contiguous. Even if the column contains blanks, List Search will still load all the unique values in the current data region or list.
November 2016 Update
I published an updated version of the List Search Add-in with a few new features. Here is a video overview of the new features.
Here is a list of the features.
- Added a “Paste” option to the directions list. This will copy the input value to the clipboard and paste it to the activecell. The Paste options uses the SendKeys method in VBA to perform the paste. This means the Undo history will NOT be cleared when using the Paste Option.
- Settings for the Options Menu and Input Direction Drop-down are now saved to the registry. Your preferences will be saved and loaded when you open Excel and the add-in again in the future.
- Added enhancements for Excel Tables. When the activecell is in a Table and the cell does not contain validation, a unique list of values will be loaded and exclude the Table headers and total row.
- Added Copy List feature that copies the contents of the drop-down list to the clipboard. This feature is used to create a list of unique values from a column/table when the activecell does not contain validation. It also works when the list is filtered with a search term to only copy filtered results.
April 2017 Update
Based on your awesome feedback and requests, I'm excited to publish another update with new features. I share the new features in the following video.
Here is a list of the new features in the April 2017 update.
- It added the Auto Open feature to automatically open the form when a cell that contains data validation is selected. You can toggle this option on/off with a toggle button in the options menu.
- The add-in now works with data validation created by formulas (OFFSET & INDEX) and comma separated lists. It should work with all types of data validation lists.
- Updated Escape Key behavior to close the List Search window. If there is text in the search box, then Escape clears the search box. If the search box is empty, then Escape closes the form.
In the video I also showed some cells with drop-down button icons next to them, even though the cell was not selected. Check out my article on how to make the validation list drop-down buttons always visible to learn more about this technique.
Download the List Search Add-in (it's Free!)
The List Search Add-in is free to download and use. The VBA code is also open source so you can modify it for your needs. This is also a great way to learn how macros and add-ins work if you are learning VBA.
Note: You will create a free account for the Excel Campus Members site to access the download and any future updates.
The download site also contains installation instructions and videos.
How Can My Co-workers Use List Search?
The List Search Add-in is installed on your computer, and only you will be able to see the XL Campus tab and use List Search. If you want your co-workers to be able to use List Search there are two ways to go about it.
- Send them a link to this page to download and install List Search on their computer. They will be able to use List Search on any Excel file they have open on their computer.
- Import the List Search userform to the VB Project in your Excel file. You can add the List Search form to any of your workbooks. This must be a macro enabled workbook. You will also need to create or import the code module that contains the macro to open the List Search userform. Then add a button to the worksheet or ribbon that opens the form.
How Can We Make List Search Better?
I hope the List Search Add-in saves you some time searching data validation lists. The ultimate goal is to make it faster to find the value we are looking for in long lists of data. Please leave a comment below with any questions or suggestions. Thank you! 🙂