Show Data Validation Items in List Box

Contextures Blog Show Data Validation Items in List Box

In February, I shared a sample file that shows a popup list box, when you click on a cell that has a data validation list. The list box shows all the items from the source list, with check boxes, so you can select multiple items.

multiselectlistbox03

When you click OK, all the selected items are added to the cell, separated by a comma and space.

multiselectlistbox04

Listbox For Single Selections

Multiple selection is useful sometimes, but in most worksheets, you probably want people to select just one item in a data validation cell. So, I’ve created a new version of the List Box sample file, with a single-selection List Box.

  • Click a data validation cell, to see the List Box.
  • Then, click an item to select it, and click OK, to enter that item in the active cell

listboxsingle01

List Box Pros and Cons

There are some pros and cons to using a List Box, instead of the built-in data validation:

Pros:

  • The list length is adjustable – see more than the default 8 items
  • Font size can be increased, for easier reading
  • List can be wider – great for narrow columns, where it’s hard to see the longer data validation items

Cons:

  • Requires macros, which must be enabled
  • Wipes out the Undo list, if you select an item (like all macros that change the worksheet)

Download the Sample File

To see the code, and experiment with the Listbox, you can download the single-selection sample file from my Contextures website.

The zipped file is in xlsm format, so enable macros when you open the file.
__________________________

One thought on “Show Data Validation Items in List Box”

  1. Dear Contextures, I have a question: Can the size of the pop-up box entitled “Select Items to Add” be enlarged from the default size?
    Thank You

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.