Microsoft Office Tutorials and References
In Depth Information
Creating a Drop-Down List in a Cell
Creating a Drop-Down List in a Cell
Most Excel users probably believe that a VBA macro is required in order to display a drop-down
list in a cell. But it’s not. You can easily display a drop-down list in a cell — no macros required.
Figure 45-1 shows an example. Cell B2, when selected, displays a down arrow. Click the arrow, and
you get a list of items (in this case, month names). Click an item, and it appears in the cell. The
drop-down list can contain text, numeric values, or dates. Your formulas, of course, can refer to
cells that contain a drop-down list. The formulas always use the value that’s currently displayed.
Figure 45-1: Creating a drop-down list in a cell is easy and doesn’t require macros.
The trick to setting up a drop-down list is to use the data validation feature. The following steps
describe how to create a drop-down list of items in a cell:
1. Enter the list of items in a range.
In this example, the month names are in the range E1:E12.
2. Select the cell that will contain the drop-down list (cell B2, in this example).
3. Choose Data
Data Tools
Data Validation.
4. In the Data Validation dialog box, click the Settings tab.
5. In the Allow drop-down list, select List.
6. In the Source box, specify the range that contains the items.
In this example, the range is E1:E12.
7. Make sure that the In-Cell Dropdown option is checked (see Figure 45-2) and click OK.
If your list is short, you can avoid Step 1. Rather, just type your list items (separated by commas)
in the Source box in the Data Validation dialog box.
Search JabSto ::

Custom Search