You can use combo boxes to show a drop down list, either in a UserForm, or on a worksheet. Sometimes a list is easy to understand, like this one, which shows a part number and part name.
If the list has multiple columns, it might help if there is a heading for each column, like the one in the next screen shot.
You could probably figure it out without the headings, but it removes any potential confusion, if you show the labels at the top of the list.
The Combo Box Source
If you decide to show column headings, the text in the row above the row source will be used as headings.
In this example, the row source is a named range – MonthTable – which is based on a formatted table’s data range. The named range doesn’t include the table’s heading row.
NOTE: If the source data starts in row 1, the column letters will show as the combo box headings.
Turn on Column Heads
To show the column headings for a UserForm combo box, follow these steps.
- In the Visual Basic Editor (VBE), select the combo box
- In the properties window, change the ColumnHeads property to True.
- You can also set the ColumnWidths property, to make sure there is enough room for the data in each column. This also ensures that the headings line up correctly with the column items.
Download the Sample File
To see how the headings work, you can download the sample file from my Combo Box Tips page.
The zipped file is in xlsm format, and contains macros, so enable them if you want to test the UserForm.
What Would You Ask Microsoft’s Excel Team?
Do you have questions about UserForms, or Combo Boxes, or any other Excel features?
Tomorrow, Friday, April 4th, Microsoft’s Excel team will be hosting an AMA (Ask Me Anything) on Reddit. The live interaction starts at 4 PM Eastern Time (1 PM Pacific).
Starting thinking about your questions now, so you’ll have them ready to post tomorrow. It should be fun, and informative!
Here’s a picture they made in Excel, to celebrate this event.