Lists in excel cells

Create a drop-down list

You can help people work more efficiently in worksheets by using drop-down lists in cells. Drop-downs allow people to pick an item from a list that you create.

Your browser does not support video. Install Microsoft Silverlight, Adobe Flash Player, or Internet Explorer 9.

  1. In a new worksheet, type the entries you want to appear in your drop-down list. Ideally, you’ll have your list items in an
    Excel table
    . If you don’t, then you can quickly convert your list to a table by selecting any cell in the range, and pressing

    Ctrl+T

    .

    Excel Table used as a Data Validation list source

    Notes: 

    • Why should you put your data in a table? When your data is in a table, then as you
      add or remove items from the list
      , any drop-downs you based on that table will automatically update. You don’t need to do anything else.

    • Now is a good time to
      Sort data in a range or table
      in your drop-down list.

  2. Select the cell in the worksheet where you want the drop-down list.

  3. Go to the

    Data

    tab on the Ribbon, then

    Data Validation

    .

    Note: 
    If you can’t click

    Data Validation

    , the worksheet might be protected or shared.
    Unlock specific areas of a protected workbook
    or stop sharing the worksheet, and then try step 3 again.

  4. On the

    Settings

    tab, in the

    Allow

    box, click

    List

    .

  5. Click in the

    Source

    box, then select your list range. We put ours on a sheet called Cities, in range A2:A9. Note that we left out the header row, because we don’t want that to be a selection option:

    Data Validation List options

  6. If it’s OK for people to leave the cell empty, check the

    Ignore blank

    box.

  7. Check the

    In-cell dropdown

    box.

  8. Click the

    Input Message

    tab.

    • If you want a message to pop up when the cell is clicked, check the

      Show input message when cell is selected

      box, and type a title and message in the boxes (up to 225 characters). If you don’t want a message to show up, clear the check box.

      Data Validation Input Message option

  9. Click the

    Error Alert

    tab.

    • If you want a message to pop up when someone enters something that’s not in your list, check the

      Show error alert after invalid data is entered

      box, pick an option from the

      Style

      box, and type a title and message. If you don’t want a message to show up, clear the check box.

      Data Validation Drop-Down Error Message options

  10. Not sure which option to pick in the

    Style

    box?

    • To show a message that doesn’t stop people from entering data that isn’t in the drop-down list, click

      Information

      or Warning. Information will show a message with this icon
      Message shows Information icon but doesn't stop people from choosing from the drop-down list
      and Warning will show a message with this icon
      Message shows Warning icon but doesn't stop people from choosing from the drop-down list
      .

    • To stop people from entering data that isn’t in the drop-down list, click

      Stop

      .

      Note: 
      If you don’t add a title or text, the title defaults to «Microsoft Excel» and the message to: «The value you entered is not valid. A user has restricted values that can be entered into this cell.»

You can download an example workbook with multiple data validation examples like the one in this article. You can follow along, or create your own data validation scenarios.
Download Excel data validation examples
.

Data entry is quicker and more accurate when you restrict values in a cell to choices from a drop-down list.

Drop-down list with values High, Medium, and Low

Start by making a list of valid entries on a sheet, and sort or rearrange the entries so that they appear in the order you want. Then you can use the entries as the source for your drop-down list of data. If the list is not large, you can easily refer to it and type the entries directly into the data validation tool.

  1. Create a list of valid entries for the drop-down list, typed on a sheet in a single column or row without blank cells.

  2. Select the cells that you want to restrict data entry in.

  3. On the

    Data

    tab, under

    Tools

    , click

    Data Validation

    or

    Validate

    .

    Excel tool bar data menu with Data Validation selected

    Note: 
    If the validation command is unavailable, the sheet might be protected or the workbook may be shared. You cannot change data validation settings if your workbook is shared or your sheet is protected. For more information about workbook protection, see
    Protect a workbook
    .

  4. Click the

    Settings

    tab, and then in the

    Allow

    pop-up menu, click

    List

    .

  5. Click in the

    Source

    box, and then on your sheet, select your list of valid entries.

    The dialog box minimizes to make the sheet easier to see.

  6. Press RETURN or click the

    Expand
    Data validation expand button
    button to restore the dialog box, and then click

    OK

    .

    Tips: 

    • You can also type values directly into the

      Source

      box, separated by a comma.

    • To modify the list of valid entries, simply change the values in the source list or edit the range in the

      Source

      box.

    • You can specify your own error message to respond to invalid data inputs. On the

      Data

      tab, click

      Data Validation

      or

      Validate

      , and then click the

      Error Alert

      tab.

See also

Apply data validation to cells

  1. In a new worksheet, type the entries you want to appear in your drop-down list. Ideally, you’ll have your list items in an
    Excel table
    .

    Notes: 

    • Why should you put your data in a table? When your data is in a table, then as you
      add or remove items from the list
      , any drop-downs you based on that table will automatically update. You don’t need to do anything else.

    • Now is a good time to
      Sort your data in the order you want it to appear
      in your drop-down list.

  2. Select the cell in the worksheet where you want the drop-down list.

  3. Go to the

    Data

    tab on the Ribbon, then click

    Data Validation

    .

  4. On the

    Settings

    tab, in the

    Allow

    box, click

    List

    .

  5. If you already made a table with the drop-down entries, click in the

    Source

    box, and then click and drag the cells that contain those entries. However, do not include the header cell. Just include the cells that should appear in the drop-down. You can also just type a list of entries in the

    Source

    box, separated by a comma like this:


    Fruit,Vegetables,Grains,Dairy,Snacks

  6. If it’s OK for people to leave the cell empty, check the

    Ignore blank

    box.

  7. Check the

    In-cell dropdown

    box.

  8. Click the

    Input Message

    tab.

    • If you want a message to pop up when the cell is clicked, check the

      Show message

      checkbox, and type a title and message in the boxes (up to 225 characters). If you don’t want a message to show up, clear the check box.

  9. Click the

    Error Alert

    tab.

    • If you want a message to pop up when someone enters something that’s not in your list, check the

      Show Alert

      checkbox, pick an option in

      Type

      , and type a title and message. If you don’t want a message to show up, clear the check box.

  10. Click

    OK

    .

After you create your drop-down list, make sure it works the way you want. For example, you might want to check to see if
Change the column width and row height
to show all your entries. If you decide you want to change the options in your drop-down list, see
Add or remove items from a drop-down list
. To delete a drop-down list, see
Remove a drop-down list
.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

See also

Add or remove items from a drop-down list

Video: Create and manage drop-down lists

Overview of Excel tables

Apply data validation to cells

Lock or unlock specific areas of a protected worksheet

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

When we need to collect data from others, they may write different things from their perspective. Still, we need to make all the related stories under one. Also, it is common that while entering the data, they make mistakes because of typo errors. For example, assume in certain cells, if we ask users to enter either “YES” or “NO,” one will enter “Y,” someone will insert “YES” like this, and we may end up getting a different kind of results. So in such cases, creating a list of values as pre-determined values allows the users only to choose from the list instead of users entering their values. Therefore, in this article, we will show you how to create a list of values in Excel.

Table of contents
  • Create List in Excel
    • #1 – Create a Drop-Down List in Excel
    • #2 – Create List of Values from Cells
    • #3 – Create List through Named Manager
    • Things to Remember
    • Recommended Articles

You can download this Create List Excel Template here – Create List Excel Template

#1 – Create a Drop-Down List in Excel

We can create a drop-down list in Excel using the “Data Validation in excelThe data validation in excel helps control the kind of input entered by a user in the worksheet.read more” tool, so as the word itself says, data will be validated even before the user decides to enter. So, all the values that need to be entered are pre-validated by creating a drop-down list in Excel. For example, assume we need to allow the user to choose only “Agree” and “Not Agree,” so we will create a list of values in the drop-down list.

  • In the Excel worksheet under the “Data” tab, we have an option called “Data Validation” from this again, choose “Data Validation.”

Using Drop Down List 1

  • As a result, this will open the “Data Validation” tool window.

Using Drop Down List 1-1

  • The “Settings” tab will be shown by default, and now we need to create validation criteria. Since we are creating a list of values, choose “List” as the option from the “Allow” drop-down list.

Using Drop Down List 1-2

  • For this “List,” we can give a list of values to be validated in the following way, i.e., by directly entering the values in the “Source” list.

Using Drop Down List 1-3

  • Enter the first value as “Agree.”

Using Drop Down List 1-4

  • Once the first value to be validated is entered, we need to enter “comma” (,) as the list separator before entering the next value. So, enter “comma” and enter the following values as “Not Agree.”

Using Drop Down List 1-5

  • After that, click on “Ok,” and the list of values may appear in the form of the “drop-down” list.

Using Drop Down List 1-6

#2 – Create a List of Values from Cells

The above method is to get started, but imagine the scenario of creating a long list of values or your list of values changing now and then. Then, it may get difficult to return and edit the list of values manually. So, by entering values in the cell, we can easily create a list of values in Excel.

Follow the steps to create a list from cell values.

  1. We must first insert all the values in the cells.

    Create List Example 2

  2. Then, open “Data Validation” and choose the validation type as “List.”

    Create List Example 2-1

  3. Next, in the “Source” box, we need to place the cursor and select the list of values from the range of cells A1 to A5.

    Create List Example 2-3

  4. Click on “OK,” and we will have the list ready in cell C2.

    Create List Example 2-4
    So values to this list are supplied from the range of cells A1 to A5. Any changes in these referenced cells will also impact the drop-down list.

For example, in cell A4, we have a value as “Apr,” but now we will change that to “Jun” and see what happens in the drop-down list.

Create List Example 2-5

Now, look at the result of the drop-down list. Instead of “Apr,” we see “Jun” because we had given the list source as cell range, not manual entries.

#3 – Create List through Named Manager

There is another way to create a list of values, i.e., through named ranges in excelName range in Excel is a name given to a range for the future reference. To name a range, first select the range of data and then insert a table to the range, then put a name to the range from the name box on the left-hand side of the window.read more.

  • We have values from A1 to A5 in the above example, naming this range “Months.”

Create List Example 3

  • Now, select the cell where we need to create a list and open the drop-down list.

Create List Example 3-1

  • Now place the cursor in the “Source” box and press the F3 key to an open list of named ranges.

Create List Example 3-2

  • As we can see above, we have a list of names, choose the name “Months” and click on “OK” to get the name to the “Source” box.

Create List Example 3-3

  • Click on “OK,” and the drop-down list is ready.

Create List Example 3-4

Things to Remember

  • The shortcut key to open data validation is “ALT + A + V + V.
  • We must always create a list of values in the cells so that it may impact the drop-down list if any change happens in the referenced cells.

Recommended Articles

This article has been a guide to Excel Create List. Here, we learn how to create a list of values in Excel also, create a simple drop-down method and make a list through name manager along with examples and downloadable Excel templates. You may learn more about Excel from the following articles: –

  • Custom List in Excel
  • Drop Down List in Excel
  • Compare Two Lists in Excel
  • How to Randomize List in Excel?


Download Article


Download Article

If you’re wondering how to create a multiple-line list in a single cell in Microsoft Excel, you’ve come to the right place. Whether you want a cell to contain a bulleted list with line breaks, a numbered list, or a drop-down list, inserting a list is easy once you know where to look. This wikiHow will teach you three helpful ways to insert any type of list to one cell in Excel.

  1. Image titled Make a List Within a Cell in Excel Step 1

    1

    Double-click the cell you want to edit. If you want to create a bullet or numerical list in a single cell with each item on its own line, start by double-clicking the cell into which you want to type the list.

  2. Image titled Make a List Within a Cell in Excel Step 2

    2

    Insert a bullet point (optional). If you want to preface each list item with a bullet rather than a number or other character, you can use a key shortcut to insert the bullet symbol. Here’s how:

    • Mac: Press Option + 8.
    • Windows:

      • If you have a numeric keypad on the side of your keyboard, hold down the Alt key while pressing 7 on the keypad.[1]
      • If not, click the Insert menu, select Symbol, type 2022 into the «Character code» box at the bottom, and then click Insert.
      • If 2022 didn’t bring up a bullet point, select the Wingdings font instead, and then enter 159 as the character code. You can then click Insert to add the bullet point.

    Advertisement

  3. Image titled Make a List Within a Cell in Excel Step 3

    3

    Type your first list item. Don’t press Enter or Return after typing.

    • If you want your list to be numbered, preface the first list item with 1. or 1).
  4. Image titled Make a List Within a Cell in Excel Step 4

    4

    Press Alt+ Enter (PC) or Control+ Option+ Return on a Mac. This adds a line break so you can start typing on the next line of the same cell.[2]

  5. Image titled Make a List Within a Cell in Excel Step 5

    5

    Type the remaining list items. To continue your list, just enter another bullet point on the second line, type the list item, and press Alt + Enter or Control + Option + Return to open a new line. When you’re finished, you can click anywhere else on your sheet to exit the cell.

  6. Advertisement

  1. Image titled Make a List Within a Cell in Excel Step 6

    1

    Create your list in another app. If you’re trying to paste a bullet list (or other type of list) into a single cell rather than have it spread across multiple cells, there’s a trick to pasting the list. Start by creating your list in an app like Word, TextEdit, or Notepad.

    • If you create a bulleted list in Word, the bullets will copy over to your cell when pasted into Excel. Bullets may not copy from other apps.
  2. Image titled Make a List Within a Cell in Excel Step 7

    2

    Copy the list. To do this, just highlight the list, right-click the highlighted area, and then select Copy.

  3. Image titled Make a List Within a Cell in Excel Step 8

    3

    Double-click a cell in Excel. Double-clicking the cell before pasting makes it so the list items will all appear in the same cell.

  4. Image titled Make a List Within a Cell in Excel Step 9

    4

    Right-click the cell. The context menu will expand.

  5. Image titled Make a List Within a Cell in Excel Step 10

    5

    Click the clipboard icon under «Paste Options.» The icon has a clipboard and a black rectangle. This pastes the list into the cell you double-clicked. Each list item will appear on its own line within the same cell.

  6. Advertisement

  1. Image titled Make a List Within a Cell in Excel Step 11

    1

    Open the workbook in which you want to create a drop-down list. If you want to be able to click a cell to view and select from a drop-down list, you can create a list with Excel’s data validation tool.[3]

  2. Image titled Make a List Within a Cell in Excel Step 12

    2

    Create a new worksheet in the workbook. You can do this by clicking the + next to the existing workbook sheets at the bottom of Excel. This worksheet is where you’ll enter the items that you want to appear in your drop-down list.

    • After you create the list on a separate sheet and add it to a table, you’ll be able to create a drop-down list containing the list data in any cell you want.
  3. Image titled Make a List Within a Cell in Excel Step 13

    3

    Type each list item into a single column. Enter every possible list choice into its own separate cell. The items you type will all be available in the drop-down list.

    • If you plan to make a lot of drop-down menus and want to use this same sheet to create all of them, add a header to the top of the list. For example, if you’re making a list of cities, you could type City into the first cell. This header won’t actually appear on the drop-down list you create—it’s just for organization on this sheet that contains list data.
  4. Image titled Make a List Within a Cell in Excel Step 14

    4

    Highlight the entire table and press Ctrl+T. Include the header at the top of the list when highlighting. This opens the Create Table dialog.

  5. Image titled Make a List Within a Cell in Excel Step 15

    5

    Choose a header option and click OK. If you added a header to the top of your list, check the box next to «My table has headers.» If not, make sure there is no checkmark there before clicking OK.

    • Now that your list is in a table, you can make changes to it after creating your drop-down list, and your drop-down list will update automatically.
  6. Image titled Make a List Within a Cell in Excel Step 16

    6

    Sort the list alphabetically. This will keep your list organized once you add it to your sheet. To do this, just click the arrow next to your header cell and select Sort A to Z.

  7. Image titled Make a List Within a Cell in Excel Step 17

    7

    Click the cell on the worksheet in which you want to add the list. This can be any cell on any worksheet in the workbook.

  8. Image titled Make a List Within a Cell in Excel Step 18

    8

    Type a name for the list into the cell. This is the cell where the list will appear, so give it a name that indicates the type of option you should choose from that list. For example, if you made a list of cities, you could type City here.

  9. Image titled Make a List Within a Cell in Excel Step 19

    9

    Click the Data tab and select Data Validation. Make sure the cell is selected before doing this. If you don’t see Data Validation in the toolbar, click the icon in the «Data Tools» section that has two black rectangles with a green checkmark and a red circle with a line through it. This opens the Data Validation window.

  10. Image titled Make a List Within a Cell in Excel Step 20

    10

    Click the «Allow» menu and select List. Additional options will expand.

  11. Image titled Make a List Within a Cell in Excel Step 21

    11

    Click the up-arrow in the «Source» field. This minimizes the Data Validation window so you can select your list data.

  12. Image titled Make a List Within a Cell in Excel Step 22

    12

    Select the list (without the header) and press Enter or Return. Click back over to the tab that has your list data and drag the mouse cursor over just the list items. Pressing Enter or Return will add the range to the «Source» field.

  13. Image titled Make a List Within a Cell in Excel Step 23

    13

    Click OK. The selected cell now has a drop-down list. If you need to add or remove items from the list, you can simply make those changes on your new worksheet and they’ll automatically propagate to the list.

  14. Advertisement

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

Thanks for submitting a tip for review!

About This Article

Article SummaryX

1. Double-click the cell.
2. Press Alt + 7 or Option + 8 to add a bullet point.
3. Type a list item.
4. Press Alt + Enter (PC) or Control + Option + Return (Mac) to go to the next line.
5. Repeat until your list is finished.

Did this summary help you?

Thanks to all authors for creating a page that has been read 62,222 times.

Is this article up to date?

A drop-down list is an excellent way to give the user an option to select from a pre-defined list.

It can be used while getting a user to fill a form, or while creating interactive Excel dashboards.

Drop-down lists are quite common on websites/apps and are very intuitive for the user.

Watch Video – Creating a Drop Down List in Excel

In this tutorial, you’ll learn how to create a drop down list in Excel (it takes only a few seconds to do this) along with all the awesome stuff you can do with it.

How to Create a Drop Down List in Excel

In this section, you will learn the exacts steps to create an Excel drop-down list:

  1. Using Data from Cells.
  2. Entering Data Manually.
  3. Using the OFFSET formula.

#1 Using Data from Cells

Let’s say you have a list of items as shown below:

List of Items for which a drop down list needs to be created

Here are the steps to create an Excel Drop Down List:

  1. Select a cell where you want to create the drop down list.
  2. Go to Data –> Data Tools –> Data Validation.An image of Data Validation option in the ribbon
  3. In the Data Validation dialogue box, within the Settings tab, select List as the Validation criteria.
    • As soon as you select List, the source field appears.Data Validation settings for creating drop down list in Excel
  4. In the source field, enter =$A$2:$A$6, or simply click in the Source field and select the cells using the mouse and click OK. This will insert a drop down list in cell C2.
    • Make sure that the In-cell dropdown option is checked (which is checked by default). If this option in unchecked, the cell does not show a drop down, however, you can manually enter the values in the list.Selecting the range for which a drop down menu is to be created

Note: If you want to create drop down lists in multiple cells at one go, select all the cells where you want to create it and then follow the above steps. Make sure that the cell references are absolute (such as $A$2) and not relative (such as A2, or A$2, or $A2).

#2 By Entering Data Manually

In the above example, cell references are used in the Source field. You can also add items directly by entering it manually in the source field.

For example, let’s say you want to show two options, Yes and No, in the drop down in a cell. Here is how you can directly enter it in the data validation source field:

This will create a drop-down list in the selected cell. All the items listed in the source field, separated by a comma, are listed in different lines in the drop down menu.

All the items entered in the source field, separated by a comma, are displayed in different lines in the drop down list.

Drop-Down Menu in Excel - Manual Entry demo

Note: If you want to create drop down lists in multiple cells at one go, select all the cells where you want to create it and then follow the above steps.

#3 Using Excel Formulas

Apart from selecting from cells and entering data manually, you can also use a formula in the source field to create an Excel drop down list.

Any formula that returns a list of values can be used to create a drop-down list in Excel.

For example, suppose you have the data set as shown below:

List of items for which a drop-down list needs to be created

Here are the steps to create an Excel drop down list using the OFFSET function:

This will create a drop-down list that lists all the fruit names (as shown below).

Using OFFSET function to create the Excel drop down listNote: If you want to create a drop-down list in multiple cells at one go, select all the cells where you want to create it and then follow the above steps. Make sure that the cell references are absolute (such as $A$2) and not relative (such as A2, or A$2, or $A2).

How this formula Works??

In the above case, we used an OFFSET function to create the drop down list. It returns a list of items from the ra

It returns a list of items from the range A2:A6.

Here is the syntax of the OFFSET function: =OFFSET(reference, rows, cols, [height], [width])

It takes five arguments, where we specified the reference as A2 (the starting point of the list). Rows/Cols are specified as 0 as we don’t want to offset the reference cell. Height is specified as 5 as there are five elements in the list.

Now, when you use this formula, it returns an array that has the list of the five fruits in A2:A6. Note that if you enter the formula in a cell, select it and press F9, you would see that it returns an array of the fruit names.

Offset function returns a set of items

Creating a Dynamic Drop Down List in Excel (Using OFFSET)

The above technique of using a formula to create a drop down list can be extended to create a dynamic drop down list as well. If you use the OFFSET function, as shown above, even if you add more items to the list, the drop down would not update automatically. You will have to manually update it each time you change the list.

Here is a way to make it dynamic (and it’s nothing but a minor tweak in the formula):

  • Select a cell where you want to create the drop down list (cell C2 in this example).
  • Go to Data –> Data Tools –> Data Validation.
  • In the Data Validation dialogue box, within the Settings tab, select List as the Validation criteria. As soon as you select List, the source field appears.
  • In the source field, enter the following formula: =OFFSET($A$2,0,0,COUNTIF($A$2:$A$100,”<>”))
  • Make sure that the In-cell drop down option is checked.
  • Click OK.

In this formula, I have replaced the argument 5 with COUNTIF($A$2:$A$100,”<>”).

The COUNTIF function counts the non-blank cells in the range A2:A100. Hence, the OFFSET function adjusts itself to include all the non-blank cells.

A demo of how dynamic drop-down lists work in Excel

Note:

  • For this to work, there must NOT be any blank cells in between the cells that are filled.
  • If you want to create a drop-down list in multiple cells at one go, select all the cells where you want to create it and then follow the above steps. Make sure that the cell references are absolute (such as $A$2) and not relative (such as A2, or A$2, or $A2).

Copy Pasting Drop-Down Lists in Excel

You can copy paste the cells with data validation to other cells, and it will copy the data validation as well.

For example, if you have a drop-down list in cell C2, and you want to apply it to C3:C6 as well, simply copy the cell C2 and paste it in C3:C6. This will copy the drop-down list and make it available in C3:C6 (along with the drop down, it will also copy the formatting).

If you only want to copy the drop down and not the formatting, here are the steps:

This will only copy the drop down and not the formatting of the copied cell.

Caution while Working with Excel Drop Down List

You need to to be careful when you are working with drop down lists in Excel.

When you copy a cell (that does not contain a drop down list) over a cell that contains a drop down list, the drop down list is lost.

The worst part of this is that Excel will not show any alert or prompt to let the user know that a drop down will be overwritten.

How to Select All Cells that have a Drop Down List in it

Sometimes, it ‘s hard to know which cells contain the drop down list.

Hence, it makes sense to mark these cells by either giving it a distinct border or a background color.

Instead of manually checking all the cells, there is a quick way to select all the cells that have drop-down lists (or any data validation rule) in it.

This would instantly select all the cells that have a data validation rule applied to it (this includes drop down lists as well).

Now you can simply format the cells (give a border or a background color) so that visually visible and you don’t accidentally copy another cell on it.

Here is another technique by Jon Acampora you can use to always keep the drop down arrow icon visible. You can also see some ways to do this in this video by Mr. Excel.

Creating a Dependent / Conditional Excel Drop Down List

Here is a video on how to create a dependent drop-down list in Excel.

If you prefer reading over watching a video, keep reading.

Sometimes, you may have more than one drop-down list and you want the items displayed in the second drop down to be dependent on what the user selected in the first drop-down.

These are called dependent or conditional drop down lists.

Below is an example of a conditional/dependent drop down list:

A demo of dependent drop down list in Excel

In the above example, when the items listed in ‘Drop Down 2’ are dependent on the selection made in ‘Drop Down 1’.

Now let’s see how to create this.

Here are the steps to create a dependent / conditional drop down list in Excel:

Now, when you make the selection in Drop Down 1, the options listed in Drop Down List 2 would automatically update.

Download the Example File

How does this work? – The conditional drop down list (in cell E3) refers to =INDIRECT(D3). This means that when you select ‘Fruits’ in cell D3, the drop down list in E3 refers to the named range ‘Fruits’ (through the INDIRECT function) and hence lists all the items in that category.

Important Note While Working with Conditional Drop Down Lists in Excel:

  • When you have made the selection, and then you change the parent drop down, the dependent drop down would not change and would, therefore, be a wrong entry. For example, if you select the US as the country and then select Florida as the state, and then go back and change the country to India, the state would remain as Florida. Here is a great tutorial by Debra on clearing dependent (conditional) drop down lists in Excel when the selection is changed.
  • If the main category is more than one word (for example, ‘Seasonal Fruits’ instead of ‘Fruits’), then you need to use the formula =INDIRECT(SUBSTITUTE(D3,” “,”_”)), instead of the simple INDIRECT function shown above. The reason for this is that Excel does not allow spaces in named ranges. So when you create a named range using more than one word, Excel automatically inserts an underscore in between words. So ‘Seasonal Fruits’ named range would be ‘Seasonal_Fruits’. Using the SUBSTITUTE function within the INDIRECT function makes sure that spaces are converted into underscores. 

You May Also Like the Following Excel Tutorials:

  • Extract Data from Drop Down List Selection in Excel.
  • Select Multiple Items from a Drop Down List in Excel.
  • Creating a Dynamic Excel Filter Search Box.
  • Display Main and Subcategory in Drop Down List in Excel.
  • How to Insert Checkbox in Excel.
  • Using a Radio Button (Option Button) in Excel.
  • How to Remove Drop-Down List in Excel?

Содержание

    • 0.1 Простейший способ
      • 0.1.1 Excel
      • 0.1.2 Calc
    • 0.2 Простейший способ
      • 0.2.1 Excel
      • 0.2.2 Calc
    • 0.3 Мудрейший способ
      • 0.3.1 Excel
      • 0.3.2 Calc
      • 0.3.3 Кстати
  • 1 , но можно и «неформально» обрамить его тэгом — и покажи мне разницу…«, но имеет место бывать. Выделите ячейки с данными, которые должны попасть в выпадающий список (например, наименованиями товаров). Выберите в меню Вставка — Имя — Присвоить (Insert — Name — Define) и введите имя (можно любое, но обязательно без пробелов!) для выделенного диапазона (например Товары). Нажмите ОК. Можно сделать и так: Выделить диапазон ячеек (А1, В1, С1 в данном примере), и претворить его в «реальный» список В любом случае списку должно быть присвоено уникальное имя. Выделите ячейки (можно сразу несколько), в которых хотите получить выпадающий список и выберите в меню «Данные — Проверка» (Data — Validation). На первой вкладке «Параметры» из выпадающего списка «Тип данных» выберите вариант «Список» и введите в строчку «Источник» знак равно и имя диапазона (т.е. =Товары). Почему это круто: список «Товары» можно будет потом произвольно увеличивать или уменьшать. Табличный редактор будет учитывать не определенные ячейки, расположенные в определенном месте, а список as is. И все изменения в списке будут распространяться на все ячейки, которые «проверяют его для создания выпадающих списков». Горячие клавиши Курсор стоит на ячейке с выпадающим списком. Excel Alt+Down arrow. То есть, Alt+стрелка «вниз». Calc По-умолчанию не установлено. В справке написано Ctrl+D, но в справке баг (увы). Поэтому назначаем лично: Tools > Customize > Keyboard > Shortcut Keys Проскроллить и выбрать желаемое сочетание клавиш для открытия существующего списка. Я выбрал Ctrl+Down. Внимание, Alt+Down недоступно (вообще все сочетания с Alt тут недоступны для редактирования). В Functions > Category выбрать Edit. В Functions > Function выбрать Selection List. Нажать на кнопку Modify. Дополнение Всякие другие волшебства на тему выпадающих списков см. на Planeta Excel. Особенно «Ссылки по теме«. Прием комментариев к этой записи завершён. «Как зделать так чбо если в віпадающем списке нет нужного варианта я в ручную набираю в етой ячейке и оно автоматически добавляется в віпадающий список, и след раз уже там есть» — хз. Тут нам не то, и не это. Не надо задавать вопросы о том, как сделать ещё что-то с этими прекрасными выпадающими списками. Здесь даже не форум по Excel. Это блог о тестировании программного обеспечения. Вы же любите тестировать, правда?
    Create a Drop-down List | Tips and Tricks Drop-down lists in Excel are helpful if you want to be sure that users select an item from a list, instead of typing their own values. Create a Drop-down List To create a drop-down list in Excel, execute the following steps. 1. On the second sheet, type the items you want to appear in the drop-down list. 2. On the first sheet, select cell B1. 3. On the Data tab, in the Data Tools group, click Data Validation. The ‘Data Validation’ dialog box appears. 4. In the Allow box, click List. 5. Click in the Source box and select the range A1:A3 on Sheet2. 6. Click OK. Result: Note: if you don’t want users to access the items on Sheet2, you can hide Sheet2. To achieve this, right click on the sheet tab of Sheet2 and click on Hide. Tips and Tricks Below you can find a few tips and tricks when creating drop-down lists in Excel. 1. You can also type the items directly into the Source box, instead of using a range reference. Note: this makes your drop-down list case sensitive. For example, if a user types pizza, an error alert will be displayed. 2a. If you type a value that is not in the list, Excel shows an error alert. 2b. To allow other entries, on the Error Alert tab, uncheck ‘Show error alert after invalid data is entered’. 3. To automatically update the drop-down-list, when you add an item to the list on Sheet2, use the following formula: =OFFSET(Sheet2!$A$1,0,0,COUNTA(Sheet2!$A:$A),1) Explanation: the OFFSET function takes 5 arguments. Reference: Sheet2!$A$1, rows to offset: 0, columns to offset: 0, height: COUNTA(Sheet2!$A:$A), width: 1. COUNTA(Sheet2!$A:$A) counts the number of values in column A on Sheet2 that are not empty. When you add an item to the list on Sheet2, COUNTA(Sheet2!$A:$A) increases. As a result, the range returned by the OFFSET function expands and the drop-down list will be updated. 4. Do you want to take your Excel skills to the next level? Learn how to create dependent drop-down lists in Excel.
    A drop-down list is an excellent way to give the user an option to select from a pre-defined list. It can be used while getting a user to fill a form, or while creating interactive Excel dashboards. Drop-down lists are quite common on websites/apps and are very intuitive for the user. Watch Video – Creating a Drop Down List in Excel In this tutorial, you’ll learn how to create a drop down list in Excel (it takes only a few seconds to do this) along with all the awesome stuff you can do with it. How to Create a Drop Down List in Excel In this section, you will learn the exacts steps to create an Excel drop-down list: Using Data from Cells. Entering Data Manually. Using the OFFSET formula. #1 Using Data from Cells Let’s say you have a list of items as shown below: Here are the steps to create an Excel Drop Down List: Select a cell where you want to create the drop down list. Go to Data –> Data Tools –> Data Validation. In the Data Validation dialogue box, within the Settings tab, select List as the Validation criteria. As soon as you select List, the source field appears. In the source field, enter =$A$2:$A$6, or simply click in the Source field and select the cells using the mouse and click OK. This will insert a drop down list in cell C2. Make sure that the In-cell dropdown option is checked (which is checked by default). If this option in unchecked, the cell does not show a drop down, however, you can manually enter the values in the list. Note: If you want to create drop down lists in multiple cells at one go, select all the cells where you want to create it and then follow the above steps. Make sure that the cell references are absolute (such as $A$2) and not relative (such as A2, or A$2, or $A2). #2 By Entering Data Manually In the above example, cell references are used in the Source field. You can also add items directly by entering it manually in the source field. For example, let’s say you want to show two options, Yes and No, in the drop down in a cell. Here is how you can directly enter it in the data validation source field: This will create a drop-down list in the selected cell. All the items listed in the source field, separated by a comma, are listed in different lines in the drop down menu. All the items entered in the source field, separated by a comma, are displayed in different lines in the drop down list. Note: If you want to create drop down lists in multiple cells at one go, select all the cells where you want to create it and then follow the above steps. #3 Using Excel Formulas Apart from selecting from cells and entering data manually, you can also use a formula in the source field to create an Excel drop down list. Any formula that returns a list of values can be used to create a drop-down list in Excel. For example, suppose you have the data set as shown below: Here are the steps to create an Excel drop down list using the OFFSET function: This will create a drop-down list that lists all the fruit names (as shown below). Note: If you want to create a drop-down list in multiple cells at one go, select all the cells where you want to create it and then follow the above steps. Make sure that the cell references are absolute (such as $A$2) and not relative (such as A2, or A$2, or $A2). How this formula Works?? In the above case, we used an OFFSET function to create the drop down list. It returns a list of items from the ra It returns a list of items from the range A2:A6. Here is the syntax of the OFFSET function: =OFFSET(reference, rows, cols, , ) It takes five arguments, where we specified the reference as A2 (the starting point of the list). Rows/Cols are specified as 0 as we don’t want to offset the reference cell. Height is specified as 5 as there are five elements in the list. Now, when you use this formula, it returns an array that has the list of the five fruits in A2:A6. Note that if you enter the formula in a cell, select it and press F9, you would see that it returns an array of the fruit names. Creating a Dynamic Drop Down List in Excel (Using OFFSET) The above technique of using a formula to create a drop down list can be extended to create a dynamic drop down list as well. If you use the OFFSET function, as shown above, even if you add more items to the list, the drop down would not update automatically. You will have to manually update it each time you change the list. Here is a way to make it dynamic (and it’s nothing but a minor tweak in the formula): Select a cell where you want to create the drop down list (cell C2 in this example). Go to Data –> Data Tools –> Data Validation. In the Data Validation dialogue box, within the Settings tab, select List as the Validation criteria. As soon as you select List, the source field appears. In the source field, enter the following formula: =OFFSET($A$2,0,0,COUNTIF($A$2:$A$100,””)) Make sure that the In-cell drop down option is checked. Click OK. In this formula, I have replaced the argument 5 with COUNTIF($A$2:$A$100,””). The COUNTIF function counts the non-blank cells in the range A2:A100. Hence, the OFFSET function adjusts itself to include all the non-blank cells. Note: For this to work, there must NOT be any blank cells in between the cells that are filled. If you want to create a drop-down list in multiple cells at one go, select all the cells where you want to create it and then follow the above steps. Make sure that the cell references are absolute (such as $A$2) and not relative (such as A2, or A$2, or $A2). Copy Pasting Drop-Down Lists in Excel You can copy paste the cells with data validation to other cells, and it will copy the data validation as well. For example, if you have a drop-down list in cell C2, and you want to apply it to C3:C6 as well, simply copy the cell C2 and paste it in C3:C6. This will copy the drop-down list and make it available in C3:C6 (along with the drop down, it will also copy the formatting). If you only want to copy the drop down and not the formatting, here are the steps: This will only copy the drop down and not the formatting of the copied cell. Caution while Working with Excel Drop Down List You need to to be careful when you are working with drop down lists in Excel. When you copy a cell (that does not contain a drop down list) over a cell that contains a drop down list, the drop down list is lost. The worst part of this is that Excel will not show any alert or prompt to let the user know that a drop down will be overwritten. How to Select All Cells that have a Drop Down List in it Sometimes, it ‘s hard to know which cells contain the drop down list. Hence, it makes sense to mark these cells by either giving it a distinct border or a background color. Instead of manually checking all the cells, there is a quick way to select all the cells that have drop-down lists (or any data validation rule) in it. This would instantly select all the cells that have a data validation rule applied to it (this includes drop down lists as well). Now you can simply format the cells (give a border or a background color) so that visually visible and you don’t accidentally copy another cell on it. Here is another technique by Jon Acampora you can use to always keep the drop down arrow icon visible. You can also see some ways to do this in this video by Mr. Excel. Creating a Dependent / Conditional Excel Drop Down List Here is a video on how to create a dependent drop-down list in Excel. If you prefer reading over watching a video, keep reading. Sometimes, you may have more than one drop-down list and you want the items displayed in the second drop down to be dependent on what the user selected in the first drop-down. These are called dependent or conditional drop down lists. Below is an example of a conditional/dependent drop down list: In the above example, when the items listed in ‘Drop Down 2’ are dependent on the selection made in ‘Drop Down 1’. Now let’s see how to create this. Here are the steps to create a dependent / conditional drop down list in Excel: Now, when you make the selection in Drop Down 1, the options listed in Drop Down List 2 would automatically update. Download the Example File How does this work? – The conditional drop down list (in cell E3) refers to =INDIRECT(D3). This means that when you select ‘Fruits’ in cell D3, the drop down list in E3 refers to the named range ‘Fruits’ (through the INDIRECT function) and hence lists all the items in that category. Important Note While Working with Conditional Drop Down Lists in Excel: When you have made the selection, and then you change the parent drop down, the dependent drop down would not change and would, therefore, be a wrong entry. For example, if you select the US as the country and then select Florida as the state, and then go back and change the country to India, the state would remain as Florida. Here is a great tutorial by Debra on clearing dependent (conditional) drop down lists in Excel when the selection is changed. If the main category is more than one word (for example, ‘Seasonal Fruits’ instead of ‘Fruits’), then you need to use the formula =INDIRECT(SUBSTITUTE(D3,” “,”_”)), instead of the simple INDIRECT function shown above. The reason for this is that Excel does not allow spaces in named ranges. So when you create a named range using more than one word, Excel automatically inserts an underscore in between words. So ‘Seasonal Fruits’ named range would be ‘Seasonal_Fruits’. Using the SUBSTITUTE function within the INDIRECT function makes sure that spaces are converted into underscores.  You May Also Like the Following Excel Tutorials: Extract Data from Drop Down List Selection in Excel. Select Multiple Items from a Drop Down List in Excel. Creating a Dynamic Excel Filter Search Box. Display Main and Subcategory in Drop Down List in Excel. How to Insert Checkbox in Excel. Using a Radio Button (Option Button) in Excel.

Как сделать выпадающий список в таблице в Excel или Calc.

Пример подобного списка:

как сделать dropdown в excel

Выпадающий список в любом табличном редакторе

Понятно, что в этой клинике зубы вырывают только «пакетным» способом, или по 10, или по 20, или сразу по 30, но никак не по 11 или 27?!

Еще бы.

Простейший способ

Подходит, когда будущий список содержит ограниченное количество вариантов. Например,

  • Да
  • Хз
  • Нет

Excel

Пишем на листе короткий список пациентов. Хватает даже одного — «Иван».

Выделяем ячейку справа от «Ивана» (как на картинке), и выбираем пункты меню Data > Validation > Allow: List > Source.

Пункты «Data» и «Validation» в русскоязычных версиях называются «Данные» и «Проверка»

В поле ‘Source’ вписываем это:

Да;Хз;Нет

Пояснение: это значения выпадающего списка. Если нужно что-то добавить, учитываем, что все значения разделяются через точку с запятой.

Внимание!
В зависимости от некоторых настроек Excel по-умолчанию, бывает, что разделителем является не точка с запятой (;), а простая запятая — (). Еще не могу сказать точно, где это настраивается, поэтому пробуем оба варианта.

Итак, контора пишет:

как сделать dropdown в excel

Создаем выпадающий список

Результат

В отдельной ячейке «под курсором» создан выпадающий список

Копируем эту ячейку as is (просто курсор находится «на ячейке», жмем Ctrl+C) повсюду, куда нам нужно (ставим курсор, куда нужно, и жмем Ctrl+V). Можно скопировать даже в другой файл Excel или на другой лист.

Чтобы ячейки всей колонки показывали выпадающий список, можно вставить эту ячейку со списком напротив пациента «Иван», и ухватив курсором ее нижний правый край, не отпуская левую кнопку, потянуть ее «вниз». Весь диапазон заполнится копиями нашей «ячейки со списком».

Итого:

Итоговый список пациентов и колонка с выпадающим списком

Calc

Все то же самое, выбираем пункты меню Data > Validity… > Allow: List > Entries.

Вписываем по одному значению на строку

  • Да
  • Хз
  • Нет

как сделать dropdown в excel

Составляем список в OpenOffice Calc

А теперь предположим, что бухгалтерия уже две недели шурует с этим файлом, и вдруг требует вставить им еще и варианты «Может быть» и «Частично»…

Простейший способ

Excel

Ставим курсор на ячейку, в которой содержится наш список, и снова взываем к ее редактированию (Data > Validation > Allow: List > Source).

Редактируем список. Но не используем клавиши «влево — вправо».

Почему — просто попробуй, поймешь.

Обязательно жмакаем опцию «Apply these changes to all others cells with same range». Это объяснит Excel, что внесенные изменения относятся ко всем ячейкам, которые содержат редактируемыми нами список.

.

Calc

Надо выбрать все ячейки, в которых находится наш список, снова пройти по Data > Validity… > Allow: List > Entries и изменить значения.

Мудрейший способ

Делаем ссылку на отдельно хранящийся список.

Excel

Пишем на листе короткий список пациентов. Хватает даже одного — «Иван».

На том же листе, где-то в верхних (чтобы поближе было) ячейках следует расписать опции будущих выпадающих списков.

Пример:

  • ячейка А1 — Да
  • ячейка В1 — Хз
  • ячейка С1 — Нет
  • ячейка D1 — Может быть

Переходим к списку пациентов, выделяем первую ячейку в колонке «Заплатил?» (справа от «Ивана»). Ставим курсор туда, где должна будет начинаться будущая колонка с ячейками, которые содержат выпадающий список. В нашем случае — это колонка «Заплатил?» напротив ячейки со значением «Иван».

Выбираем пункты меню Data > Validation > Allow: List > Source.

Пункты «Data» и «Validation» в русскоязычных версиях называются «Данные» и «Проверка»

В поле ‘Source’ вписываем это:

=$A$1:$C$1

или это

=A1:C1

Или ничего не вписываем, а просто кликаем на квадрат, который находится в правом краю поля Source. Окно превратится в узкую полоску. Мы не пугаемся, а курсором выделяем на листе диапазон ячеек, из которых потом будут взяты данные: A1, B1, C1, D1, E1, F1, G1, и тд, если нужно. Можно даже выделять пустые ячейки, рассчитывая заполнить их позже (мало ли что бухгалтерия придумает).

В процессе этого выделения ячеек поле Source будет заполняться самостоятельно.

По-умолчанию Excel запишет выделенный пользователем диапазон через знак «$» — он указывает, что строго-настрого нужна именно эта ячейка, брать данные только из нее, чтобы ни случилось.

Если указать просто =A1:C1, то при изменении расположения ячеек на листе (что часто бывает) Excel будет считать, что адрес указанного диапазона может быть изменен.

Дальше все то же — при наведении курсора на ячейку с выпадающим списком появляется особый указатель. Пользуемся.

Чтобы ее «размножить» — хватаем за угол и тянем вниз… Или копируем куда-нибудь в другое место на листе.

Calc

Почти то же самое, но выбираем пункты меню Data > Validity… > Allow: Cell Range > Source.

Нужно указывать диапазон руками: $A$1:$C$1, к примеру. Замечу — без знака «=«.

Кстати

Можно организовать этот список в «реальный» список на языке табличного редактора.

Собственно, шаг необязательный, из разряда «Заголовок следует обрамлять тэгом

, но можно и «неформально» обрамить его тэгом — и покажи мне разницу…«, но имеет место бывать. Выделите ячейки с данными, которые должны попасть в выпадающий список (например, наименованиями товаров). Выберите в меню Вставка — Имя — Присвоить (Insert — Name — Define) и введите имя (можно любое, но обязательно без пробелов!) для выделенного диапазона (например Товары). Нажмите ОК. Можно сделать и так: как сделать dropdown в excelВыделить диапазон ячеек (А1, В1, С1 в данном примере), и претворить его в «реальный» список В любом случае списку должно быть присвоено уникальное имя. Выделите ячейки (можно сразу несколько), в которых хотите получить выпадающий список и выберите в меню «Данные — Проверка» (Data — Validation). На первой вкладке «Параметры» из выпадающего списка «Тип данных» выберите вариант «Список» и введите в строчку «Источник» знак равно и имя диапазона (т.е. =Товары). Почему это круто: список «Товары» можно будет потом произвольно увеличивать или уменьшать. Табличный редактор будет учитывать не определенные ячейки, расположенные в определенном месте, а список as is. И все изменения в списке будут распространяться на все ячейки, которые «проверяют его для создания выпадающих списков». Горячие клавиши Курсор стоит на ячейке с выпадающим списком. Excel Alt+Down arrow. То есть, Alt+стрелка «вниз». Calc По-умолчанию не установлено. В справке написано Ctrl+D, но в справке баг (увы). Поэтому назначаем лично: Tools > Customize > Keyboard > Shortcut Keys Проскроллить и выбрать желаемое сочетание клавиш для открытия существующего списка. Я выбрал Ctrl+Down. Внимание, Alt+Down недоступно (вообще все сочетания с Alt тут недоступны для редактирования). В Functions > Category выбрать Edit. В Functions > Function выбрать Selection List. Нажать на кнопку Modify. Дополнение Всякие другие волшебства на тему выпадающих списков см. на Planeta Excel. Особенно «Ссылки по теме«. Прием комментариев к этой записи завершён. «Как зделать так чбо если в віпадающем списке нет нужного варианта я в ручную набираю в етой ячейке и оно автоматически добавляется в віпадающий список, и след раз уже там есть» — хз. Тут нам не то, и не это. Не надо задавать вопросы о том, как сделать ещё что-то с этими прекрасными выпадающими списками. Здесь даже не форум по Excel. Это блог о тестировании программного обеспечения. Вы же любите тестировать, правда?

Create a Drop-down List | Tips and Tricks Drop-down lists in Excel are helpful if you want to be sure that users select an item from a list, instead of typing their own values. Create a Drop-down List To create a drop-down list in Excel, execute the following steps. 1. On the second sheet, type the items you want to appear in the drop-down list. 2. On the first sheet, select cell B1. 3. On the Data tab, in the Data Tools group, click Data Validation. The ‘Data Validation’ dialog box appears. 4. In the Allow box, click List. 5. Click in the Source box and select the range A1:A3 on Sheet2. 6. Click OK. Result: Note: if you don’t want users to access the items on Sheet2, you can hide Sheet2. To achieve this, right click on the sheet tab of Sheet2 and click on Hide. Tips and Tricks Below you can find a few tips and tricks when creating drop-down lists in Excel. 1. You can also type the items directly into the Source box, instead of using a range reference. Note: this makes your drop-down list case sensitive. For example, if a user types pizza, an error alert will be displayed. 2a. If you type a value that is not in the list, Excel shows an error alert. 2b. To allow other entries, on the Error Alert tab, uncheck ‘Show error alert after invalid data is entered’. 3. To automatically update the drop-down-list, when you add an item to the list on Sheet2, use the following formula: =OFFSET(Sheet2!$A$1,0,0,COUNTA(Sheet2!$A:$A),1) Explanation: the OFFSET function takes 5 arguments. Reference: Sheet2!$A$1, rows to offset: 0, columns to offset: 0, height: COUNTA(Sheet2!$A:$A), width: 1. COUNTA(Sheet2!$A:$A) counts the number of values in column A on Sheet2 that are not empty. When you add an item to the list on Sheet2, COUNTA(Sheet2!$A:$A) increases. As a result, the range returned by the OFFSET function expands and the drop-down list will be updated. 4. Do you want to take your Excel skills to the next level? Learn how to create dependent drop-down lists in Excel.

A drop-down list is an excellent way to give the user an option to select from a pre-defined list. It can be used while getting a user to fill a form, or while creating interactive Excel dashboards. Drop-down lists are quite common on websites/apps and are very intuitive for the user. Watch Video – Creating a Drop Down List in Excel

In this tutorial, you’ll learn how to create a drop down list in Excel (it takes only a few seconds to do this) along with all the awesome stuff you can do with it. How to Create a Drop Down List in Excel In this section, you will learn the exacts steps to create an Excel drop-down list: Using Data from Cells. Entering Data Manually. Using the OFFSET formula. #1 Using Data from Cells Let’s say you have a list of items as shown below: Here are the steps to create an Excel Drop Down List: Select a cell where you want to create the drop down list. Go to Data –> Data Tools –> Data Validation.как сделать dropdown в excel In the Data Validation dialogue box, within the Settings tab, select List as the Validation criteria. As soon as you select List, the source field appears.как сделать dropdown в excel In the source field, enter =$A$2:$A$6, or simply click in the Source field and select the cells using the mouse and click OK. This will insert a drop down list in cell C2. Make sure that the In-cell dropdown option is checked (which is checked by default). If this option in unchecked, the cell does not show a drop down, however, you can manually enter the values in the list. Note: If you want to create drop down lists in multiple cells at one go, select all the cells where you want to create it and then follow the above steps. Make sure that the cell references are absolute (such as $A$2) and not relative (such as A2, or A$2, or $A2). #2 By Entering Data Manually In the above example, cell references are used in the Source field. You can also add items directly by entering it manually in the source field. For example, let’s say you want to show two options, Yes and No, in the drop down in a cell. Here is how you can directly enter it in the data validation source field: This will create a drop-down list in the selected cell. All the items listed in the source field, separated by a comma, are listed in different lines in the drop down menu. All the items entered in the source field, separated by a comma, are displayed in different lines in the drop down list. Note: If you want to create drop down lists in multiple cells at one go, select all the cells where you want to create it and then follow the above steps. #3 Using Excel Formulas Apart from selecting from cells and entering data manually, you can also use a formula in the source field to create an Excel drop down list. Any formula that returns a list of values can be used to create a drop-down list in Excel. For example, suppose you have the data set as shown below: Here are the steps to create an Excel drop down list using the OFFSET function: This will create a drop-down list that lists all the fruit names (as shown below). Note: If you want to create a drop-down list in multiple cells at one go, select all the cells where you want to create it and then follow the above steps. Make sure that the cell references are absolute (such as $A$2) and not relative (such as A2, or A$2, or $A2). How this formula Works?? In the above case, we used an OFFSET function to create the drop down list. It returns a list of items from the ra It returns a list of items from the range A2:A6. Here is the syntax of the OFFSET function: =OFFSET(reference, rows, cols, , ) It takes five arguments, where we specified the reference as A2 (the starting point of the list). Rows/Cols are specified as 0 as we don’t want to offset the reference cell. Height is specified as 5 as there are five elements in the list. Now, when you use this formula, it returns an array that has the list of the five fruits in A2:A6. Note that if you enter the formula in a cell, select it and press F9, you would see that it returns an array of the fruit names. Creating a Dynamic Drop Down List in Excel (Using OFFSET) The above technique of using a formula to create a drop down list can be extended to create a dynamic drop down list as well. If you use the OFFSET function, as shown above, even if you add more items to the list, the drop down would not update automatically. You will have to manually update it each time you change the list. Here is a way to make it dynamic (and it’s nothing but a minor tweak in the formula): Select a cell where you want to create the drop down list (cell C2 in this example). Go to Data –> Data Tools –> Data Validation. In the Data Validation dialogue box, within the Settings tab, select List as the Validation criteria. As soon as you select List, the source field appears. In the source field, enter the following formula: =OFFSET($A$2,0,0,COUNTIF($A$2:$A$100,””)) Make sure that the In-cell drop down option is checked. Click OK. In this formula, I have replaced the argument 5 with COUNTIF($A$2:$A$100,””). The COUNTIF function counts the non-blank cells in the range A2:A100. Hence, the OFFSET function adjusts itself to include all the non-blank cells. Note: For this to work, there must NOT be any blank cells in between the cells that are filled. If you want to create a drop-down list in multiple cells at one go, select all the cells where you want to create it and then follow the above steps. Make sure that the cell references are absolute (such as $A$2) and not relative (such as A2, or A$2, or $A2). Copy Pasting Drop-Down Lists in Excel You can copy paste the cells with data validation to other cells, and it will copy the data validation as well. For example, if you have a drop-down list in cell C2, and you want to apply it to C3:C6 as well, simply copy the cell C2 and paste it in C3:C6. This will copy the drop-down list and make it available in C3:C6 (along with the drop down, it will also copy the formatting). If you only want to copy the drop down and not the formatting, here are the steps: This will only copy the drop down and not the formatting of the copied cell. Caution while Working with Excel Drop Down List You need to to be careful when you are working with drop down lists in Excel. When you copy a cell (that does not contain a drop down list) over a cell that contains a drop down list, the drop down list is lost. The worst part of this is that Excel will not show any alert or prompt to let the user know that a drop down will be overwritten. How to Select All Cells that have a Drop Down List in it Sometimes, it ‘s hard to know which cells contain the drop down list. Hence, it makes sense to mark these cells by either giving it a distinct border or a background color. Instead of manually checking all the cells, there is a quick way to select all the cells that have drop-down lists (or any data validation rule) in it. This would instantly select all the cells that have a data validation rule applied to it (this includes drop down lists as well). Now you can simply format the cells (give a border or a background color) so that visually visible and you don’t accidentally copy another cell on it. Here is another technique by Jon Acampora you can use to always keep the drop down arrow icon visible. You can also see some ways to do this in this video by Mr. Excel. Creating a Dependent / Conditional Excel Drop Down List Here is a video on how to create a dependent drop-down list in Excel. If you prefer reading over watching a video, keep reading. Sometimes, you may have more than one drop-down list and you want the items displayed in the second drop down to be dependent on what the user selected in the first drop-down. These are called dependent or conditional drop down lists. Below is an example of a conditional/dependent drop down list: In the above example, when the items listed in ‘Drop Down 2’ are dependent on the selection made in ‘Drop Down 1’. Now let’s see how to create this. Here are the steps to create a dependent / conditional drop down list in Excel: Now, when you make the selection in Drop Down 1, the options listed in Drop Down List 2 would automatically update. Download the Example File
How does this work? – The conditional drop down list (in cell E3) refers to =INDIRECT(D3). This means that when you select ‘Fruits’ in cell D3, the drop down list in E3 refers to the named range ‘Fruits’ (through the INDIRECT function) and hence lists all the items in that category. Important Note While Working with Conditional Drop Down Lists in Excel: When you have made the selection, and then you change the parent drop down, the dependent drop down would not change and would, therefore, be a wrong entry. For example, if you select the US as the country and then select Florida as the state, and then go back and change the country to India, the state would remain as Florida. Here is a great tutorial by Debra on clearing dependent (conditional) drop down lists in Excel when the selection is changed. If the main category is more than one word (for example, ‘Seasonal Fruits’ instead of ‘Fruits’), then you need to use the formula =INDIRECT(SUBSTITUTE(D3,” “,”_”)), instead of the simple INDIRECT function shown above. The reason for this is that Excel does not allow spaces in named ranges. So when you create a named range using more than one word, Excel automatically inserts an underscore in between words. So ‘Seasonal Fruits’ named range would be ‘Seasonal_Fruits’. Using the SUBSTITUTE function within the INDIRECT function makes sure that spaces are converted into underscores.  You May Also Like the Following Excel Tutorials: Extract Data from Drop Down List Selection in Excel. Select Multiple Items from a Drop Down List in Excel. Creating a Dynamic Excel Filter Search Box. Display Main and Subcategory in Drop Down List in Excel. How to Insert Checkbox in Excel. Using a Radio Button (Option Button) in Excel.

Skip to content

5 способов создать выпадающий список в ячейке Excel

Одной из наиболее полезных функций при вводе данных является возможность использовать выпадающий список в Excel. Он позволяет выбирать значение из предварительно определенного перечня и разрешает вводить только те данные, которые соответствуют вашим требованиям. Мы предложим вам несколько простых способов, как создавать выпадающие списки в Excel. Более сложные способы, основанные на динамических диапазонах и использовании данных из других таблиц, мы также рассмотрим.

Зачем нужен выпадающий список?

Часто случается так, что в какой-то из колонок вашей таблицы нужно вводить одинаковые повторяющиеся значения. К примеру, фамилии сотрудников, названия товаров или делать выбор в ячейке Excel вида «да – нет». Что может случиться? Конечно, в первую очередь будут ошибки при вводе. Человеческий фактор ведь никто не отменял. Чем нам сие грозит? К примеру, когда мы решим подсчитать, сколько заказов выполнил каждый из менеджеров, то окажется, что фамилий больше, чем сотрудников. Далее придётся искать ошибки, исправлять их и вновь повторять расчет.

Ну и конечно же, все время руками вводить одни и те же слова – просто бессмысленная работа и потеря времени. Вот здесь-то выпадающие списки нам и пригодятся. При нажатии выпадает перечень заранее определённых значений, из которых просто необходимо указать какое-то одно.

Важно то, что вы теперь будете не писать, а выбирать их с помощью мыши или клавиатуры. Это значительно ускоряет работу, а также гарантирует защиту от случайных ошибок. Проверка того, что мы записали в таблицу, теперь уже не нужна.

1 — Самый быстрый способ создать выпадающий список.

Как проще всего добавить выпадающий список в таблицу Excel? Всего один щелчок правой кнопкой мыши по пустой клетке под столбцом с данными, затем команда контекстного меню «Выберите из раскрывающегося списка» (Choose from drop-down list). А можно просто стать в нужное место и нажать сочетание клавиш Alt+стрелка вниз. Появится отсортированный перечень уникальных ранее введенных значений.
Способ не работает, если нашу ячейку и столбец с записями отделяет хотя бы одна пустая строка или вы хотите ввести то, что еще не вводилось выше. На нашем примере это хорошо видно.

простой способ создания

2 — Используем меню.

Давайте рассмотрим небольшой пример, в котором нам нужно постоянно вводить в таблицу одни и те же наименования товаров. Выпишите в столбик данные, которые мы будем использовать (например, названия товаров). В нашем примере — в диапазон G2:G7.

Выделите ячейку таблицы (можно сразу несколько), в которых хотите использовать ввод из заранее определенного перечня. Там мы разместим наш выпадающий список.

Далее в главном меню выберите на вкладке Данные – Проверка… (Data – Validation). Затем укажите пункт Тип данных (Allow) и выберите вариант Список (List). Поставьте курсор в поле Источник (Source) и впишите в него адреса с эталонными значениями элементов — в нашем случае G2:G7. Рекомендуется также использовать здесь абсолютные ссылки (для их установки нажмите клавишу F4).

заполнить через меню

Бонусом здесь идет возможность задать подсказку и сообщение об ошибке, если автоматически вставленное значение вы захотите изменить вручную. Для этого существуют вкладки Подсказка по вводу (Input Message) и Сообщение об ошибке (Error Alert).

В качестве источника значений для выпадающего списка в Excel можно использовать также и именованный диапазон.

создаем из именованного диапазона списки в excel

К примеру, диапазону I2:I13, содержащему названия месяцев, можно присвоить наименование «месяцы». Затем имя можно ввести в поле «Источник».

использование именованного диапазона в выпадающем списке

Кроме того, и источник и в виде обычного диапазона ячеек, и именованный диапазон могут находиться на других листах вашей рабочей книги.

Но вы можете и не использовать диапазоны или ссылки, а просто определить возможные варианты прямо в поле «Источник». К примеру, чтобы реализовать в таблице Excel простейший выбор «да – нет», вы можете вписать туда –

Да;Нет

Используйте для разделения значений точку с запятой, запятую, либо другой символ, установленный у вас в качестве разделителя элементов. (Смотрите Панель управления — Часы и регион — Форматы — Дополнительно — Числа.)

3 — Создаем элемент управления.

Вставим на лист новый объект – элемент управления «Поле со списком» с последующей привязкой его к данным на листе Excel. Делаем:

  1. Откройте вкладку Разработчик (Developer). Если её не видно, то в Excel 2007 нужно нажать кнопку Офис – Параметры – флажок Отображать вкладку Разработчик на ленте (Office Button – Options – Show Developer Tab in the Ribbon) или в версии 2010–2013 и выше щелкните правой кнопкой мыши по ленте, выберите команду Настройка ленты (Customize Ribbon) и включите отображение вкладки Разработчик (Developer) с помощью флажка.
  2. Найдите нужный значок среди элементов управления (см.рисунок ниже).

используем элемент управления

Вставив элемент управления на рабочий лист, щелкните по нему правой кнопкой мышки и выберите в появившемся меню пункт «Формат объекта». Далее указываем диапазон ячеек, в котором записаны допустимые значения для ввода. В поле «Связь с ячейкой» укажем, куда именно поместить результат. Важно учитывать, что этим результатом будет не само значение из указанного нами диапазона, а только его порядковый номер.

получаем в ячейку номер позиции в списке

Но нам ведь нужен не этот номер, а соответствующее ему слово. Используем функцию ИНДЕКС (INDEX в английском варианте). Она позволяет найти в списке значений одно из них соответственно его порядковому номеру. В качестве аргументов ИНДЕКС укажите диапазон ячеек (F5:F11) и адрес с полученным порядковым номером (F2).

Формулу в F3 запишем, как показано на рисунке:

=ИНДЕКС(F5:F11;F2)

Как и в предыдущем способе, здесь возможны ссылки на другие листы, на именованные диапазоны.

Обратите также внимание, что здесь мы не привязаны ни к какой конкретному месту таблицы. Таким списком Excel удобно пользоваться, поскольку его можно свободно «перетаскивать» мышкой в любое удобное место. Для этого на вкладке «Разработчик» нужно активизировать режим конструктора.

4 — Элемент ActiveX

Действуем аналогично предыдущему способу, но выбираем иконку чуть ниже — из раздела «Элементы ActiveX».

элемент ActiveX в раскрывающемся списке

Определяем перечень допустимых значений (1). Обратите внимание, что здесь для показа можно выбирать сразу несколько колонок. Затем выбираем адрес, по которому будет вставлена нужная позиция из перечня (2).Указываем количество столбцов, которые будут использованы как исходные данные (3), и номер столбца, из которого будет происходить выбор для вставки на лист (4). Если укажете номер столбца 2, то в А5 будет вставлена не фамилия, а должность. Можно также указать количество строк, которое будет выведено в перечне. По умолчанию — 8. Остальные можно прокручивать мышкой (5).

Этот способ сложнее предыдущего, но зато возвращает сразу значение, а не его номер. Поэтому необходимость в промежуточной ячейке и обработке ее при помощи ИНДЕКС — отпадает. Думаю, таким списком пользоваться гораздо удобнее.

5 — Выпадающий список в Excel с автозаполнением

Задача: Создать перечень, в который будут автоматически добавляться значения из заданного динамического диапазона. Если в любую ячейку этого диапазона будут внесены изменения, то сразу же изменится и набор предлагаемых к выбору значений. Никакие формулы и настройки здесь корректировать не нужно.

Вот как автозаполнение может выглядеть на простом примере:

автозаполнение

Способ 1. Укажите заведомо большой источник значений для списка.

Самая простая и несложная хитрость. В начале действуем по обычному алгоритму действий: в меню выбираем на вкладке Данные – Проверка … (Data – Validation). Из перечня Тип данных (Allow) выберите вариант Список (List). Поставьте курсор в поле Источник (Source).  Зарезервируем в списке набор с большим запасом: например, до 55-й строки, хотя занято у нас только 7. Обязательно не забудьте поставить галочку в чекбоксе «Игнорировать пустые …». Тогда ваш «резерв» из пустых значений не будет вам мешать.

резервируем данные для списков

Действительно самый простой способ, но не слишком удобный. Ведь зарезервированное место может и закончиться…

Конечно, в качестве источника можно указать и весь столбец:

=$A:$A

Но обработка такого большого количества ячеек может несколько замедлить вычисления. Особенно в больших таблицах Excel.

Способ 2. Применяем именованный диапазон.

Именованный диапазон отличается от обычного тем, что ему присвоено определенное наименование. С ним гораздо проще работать, так как не нужно вводить ссылку, а достаточно просто указать его имя. Давайте рассмотрим небольшой пример.

именованный диапазон в раскрывающихся списках

В столбце А находятся имена сотрудников, которые мы будем вводить. Перечень может быть сколь угодно длинным. Нам необходимо, чтобы каждая новая запись включалась в раскрывающийся список без всяких дополнительных действий с нашей стороны.

Выделим имеющийся в нашем распоряжении перечень имен A2:A10. Затем присвоим ему название, заполнив поле «Имя», находящееся левее строки формул.

Так вы присвоите какое-то имя этому диапазону Excel.

Создадим в С2 перечень значений. В качестве источника для него укажем выражение

=имя

Недостатком работы с таким выпадающим списком в Excel является то, что новые значения нельзя просто дописывать в конец используемого перечня. Они останутся за пределами именованного диапазона. Если что-то нужно добавить, то их придется вставлять внутрь диапазона, использовав вставку пустой строки.

Перечень ещё можно отсортировать, чтобы удобно было пользоваться.

расширяем именованный диапазон

Главное неудобство пользования таким списком заключается в том, что используемый нами диапазон — статический. Автоматически его размеры измениться не могут. Согласитесь, не слишком удобный и технологичный способ. Слишком много ручных операций.

А теперь давайте пойдем дальше и посмотрим, как можно работать с динамическим диапазоном, который автоматически подстраивается под вводимые значения.

Способ 3. Выпадающий список на основе «умной» таблицы Excel.

Начиная с 2007 года таблица для Excel — уже не просто набор строк и столбцов. Если вы просто расположите показатели с привычном для нас табличном виде, то он не будет считать их таблицей. Существует специальное форматирование, после чего диапазон начинает вести себя как единое целое, приобретая целый ряд интересных свойств. В частности, он начинает сам отслеживать свои размеры, динамически изменяясь при корректировке данных.

Любой набор значений в таблице может быть таким образом преобразован. Например, A1:A8. Выделите их мышкой. Затем преобразуйте в таблицу, используя меню Главная — Форматировать как таблицу (Home — Format as Table). Укажите, что в первой строке у вас находится название столбца. Это будет «шапка» вашей таблицы. Внешний вид может быть любым: это не более чем внешнее оформление и ни на что больше оно не влияет.

Как уже было сказано выше, «умная» таблица хороша для нас тем, что динамически меняет свои размеры при добавлении в нее информации. Если в строку ниже нее вписать что-либо, то она тут же присоединит к себе её. Таким образом, новые значения можно просто дописывать. К примеру, впишите в A9 слово «кокос», и таблица тут же расширится до 9 строк.

Следовательно, автоматическое обновление набора используемой информации в списке можно организовать, если использовать содержимое какого-либо столбца «умной» таблицы.

Осталось только обозначить ее как источник. Проблема заключается в том, что программа в качестве источника в списке не понимает выражение вида

=Таблица1[Столбец1]

и не считает его формулой. Хотя в обычных выражениях на листе вашей рабочей книги это вполне будет работать. Эта конструкция обозначает ссылку на первый столбец. Но в поле «Источник» она почему-то игнорируется.

Чтобы использовать «умную таблицу» как источник, нам придется пойти на небольшую хитрость и воспользоваться функцией ДВССЫЛ (INDIRECT в английском варианте). Эта функция преобразует текстовую переменную в обычную ссылку.

добавляем в ячейку автоматически пополняемые списки

Формула теперь будет выглядеть следующим образом:

=ДВССЫЛ(«Таблица5[Продукт]»)

Таблица5 — имя, автоматически присвоенное «умной таблице». У вас оно может быть другим. На вкладке меню Конструктор (Design) можно изменить стандартное имя на свое (но без пробелов!). По нему мы сможем потом адресоваться к нашей таблице на любом листе книги.

«Продукт» — название нашего первого и единственного столбца, присвоено по его заголовку.

Не забудьте также заключить все выражение в кавычки, чтобы обозначить его как текстовую переменную.

Теперь если в A9 вы допишете еще один фрукт (например, кокос), то он тут же автоматически появится и в нашем перечне. Аналогично будет, если мы что-то удалим. Задача автоматического увеличения выпадающего списка значений решена.

Надеемся, вы сможете теперь с помощью списков без ошибок вводить часто повторяющиеся данные в таблицу Excel при помощи выпадающего списка.

А вот еще полезная для вас информация:

Как сделать зависимый выпадающий список в Excel? Одной из наиболее полезных функций проверки данных является возможность создания выпадающего списка, который позволяет выбирать значение из предварительно определенного перечня. Но как только вы начнете применять это в своих таблицах,…

Bottom Line: The complete Excel guide on how to create drop-down lists in cells (data validation lists).  Includes keyboard shortcuts to select items, copying drop-downs to other cells, handling invalid inputs, updating lists with new items, and more.

Skill Level: Beginner

Watch on YouTube & Subscribe to our Channel

Download the Excel File

You can download the file I’m using in the video here:

What Are Data Validation Lists?

Creating a drop-down list is a great way to ensure that entries are uniform and free from spelling errors.  It also helps restrict entries so that only values you’ve approved make it onto the sheet.

That’s why they are also called data validation lists.  They help to make sure that only valid data makes it into the cells that you’ve applied it to.

Drop-down Lists in Excel Prevent Input Errors Interactive2

This can be helpful when multiple users are entering data on the same sheet and you want the options to be limited to a list of items or values that you’ve already approved.

We can also use drop-down lists to create interactive reports and financial models, where results change when the user changes a cell’s value.

How to Create a Drop-down (Data Validation) List

To create a drop-down list, start by going to the Data tab on the Ribbon and click the Data Validation button.

Select the Data Validation Button on the Data Tab

The Data Validation window will appear.  The keyboard shortcut to open the Data Validation window is Alt, A, V, V.

You’ll want to select List in the drop-down menu under Allow.

Data Validation Window Allow List

At this point there are a few ways that you can tell Excel what items you want to include in your drop-down list.

Drop-down List from Comma Separated Values

The first way is by typing all of the options that you want in your drop-down list, separated by commas, into the Source field.  For example, if there are only two options to choose from, such as Yes and No, you would simply type “Yes, No” (do not include the quotation marks) in the Source box.  It doesn’t matter whether a space follows your comma or not.

A longer list of options might look like this: “Red, Blue, Green, Purple, Orange, Yellow, Brown”.  The options in your drop-down list will appear in the exact same order that you have typed them.

Data Valiation Window Comma Separated List

Note: On some language versions of Excel you will need to use a semicolon (;) instead of a comma.

Drop-down List from a Range of Values

The second way to fill your list with options is to choose them from a range of values.  To do this, instead of typing values into the Source field, you want to select the icon to the right.

Data Validation Window Select a Range of Values

Selecting this icon will open up a small window that will auto-fill when you select a range of cells on the worksheet. Once you’ve selected the values you want to appear in your drop-down list, you can click on the corresponding icon to take you back to the Data Validation window.

Data Validation Choose a Range

At this point, the range you’ve selected will show in the Source box and you can just hit OK.

Data Validation Window Select a Range of Values

Now the values in the range that you’ve selected show as options that you can choose from in your drop-down list.

Data Validation List Drop-down Source Range.

Shortcut for Selecting from the Drop-down List

To choose the option you want from your drop-down list, you can use your mouse to click on the option you want.  Another way to select it is to use the keyboard shortcut Alt+?.  This brings up the drop-down list and you can use your up and down arrow keys to highlight the selection you want, and then press Enter to select.

Keyboard Shortcuts for Drop-down lists

How to Search the Drop-down List

Unfortunately, Excel doesn’t have an option to search the drop-down list for a particular item, but I’ve created an add-in that gives you that option.  It’s called List Search and you can access that add-in here:

List Search Add-in Free Download 640x360

Click here to download the List Search Add-in

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 to Copy the Data Validation List to Other Cells

If you have created a drop-down list for a particular cell and would like other cells to have the same data validation list, you can easily copy (extend) that list to other cells.

Start by clicking on the cell that has the list, and then select any additional cells that you want to extend the drop-down list to.  This can include blank cells or cells that already have values in them.

Extend Data Validation Selection

As before, you will click on the Data Validation button in the Data tab, but this time a warning will appear that says, “The selection contains some cells without Data Validation settings.  Do you want to extend the Data Validation to these cells?”

Information Box Extend Data Validation to Other Cells

Choose Yes, and then hit OK when the Data Validation Window appears.  You’ll see that each of the cells in your selection now has the same drop-down options as the original cell.

Extend Data Validation

It’s also worth noting that you can copy and paste Data Validation from one cell to another just as you would copy and paste normal values and formatting.

Copy and Paste Data Validation

Handling Errors and Invalid Inputs

What happens when we enter a value into a cell that has a Data Validation List, but that value is not one of the options in the list?  That depends on the Error Alert settings, which we have control of.

Data Validation Window Error Alert Style

To change the kind of message the user receives when they enter an extraneous value, you can go back to the Data Validation window.  Under the Error Alert tab, you can find three options: Stop, Warning, and Information.

You’ll also notice that there are fields where you can change the title of the error message and the text of the message itself, so that when the user enters data that’s not part of your validation list, they will receive an alert that’s worded in the way you want it to appear.

Here is an explanation of each Error Alert Style:

Stop Style

When the user types an invalid entry, an error message will appear that gives the option to either retype the entry or cancel the attempt.  The message looks like this:

Stop message Value Doesn't Match

Warning Style

The Warning style displays a message that gives the user a choice to allow an entry that isn’t on the preset list.

Warning Style for Data Validation Message

Information Style

The Information style displays a message that automatically allows the entry no matter what the value is.  The user is presented with informative text about validation rules.

Information Style for Data Validation Message

Error Checking Alert

When any invalid entry is made in a cell, the error checking alert will appear in the cell.  The error is indicated with the green triangle in the top-left corner of the cell.  Clicking the Error Box button will allow you to see more info about data validation error.  You can select “Display Type Information” from the list to see the cause of the error.

Disable Error Alerts

Another option under the Error Alert tab is to uncheck the box that says, “Show error alert after invalid data is entered.”  This allows any value to be entered into the cell, and no message box will appear.

Data Validation Window Error Alert Allow Invalid Entries

Adding New Data to the Source Range of the List

Adding new options to our drop-down list is possible, but it isn’t automatic when we add new items the bottom of our source list.  We need to tell Excel what our new extended source range is.  You can do that in the Data Validation window by just typing in the new range, or re-selecting the range to include the new data.  (See the section above entitled “Create a Drop-Down List from a Range of Values” for how to select your range.)

The great thing is that we don’t have to redefine these settings for each cell that has Data Validation.  The “Apply these changes to all other cells with the same settings” checkbox does this for us.  When you click the checkbox, the other cells will selected in the background. This gives you a visual indication of what will be updated.

Data Validation Window Apply Settings to Similar Cells

Then press OK.  Any cells that shared the same data validation settings will now include the updated changes that you’ve made.

There is a way to automate the process so that any change you make to the source data instantly updates your drop-down list. It involves using Excel tables and named ranges. You can find out how in this post:

How to Add New Rows to Drop-down Lists Automatically – Dynamic Data Validation Lists

Removing Data Validation from a Cell

Getting rid of a Data Validation list is simple. Open the Data Validation window and click the Clear All button.

Clear or Remove Data Validation List

If you want to clear the validation settings from other cells with the same settings, make sure to click that checkbox before hitting the Clear All button.

Make Your Workbooks Interactive

Data Validation lists are a great tool to add to your Excel toolbelt.  They help us keep our data clean and make our spreadsheets easier to use.  We can use them as the source of lookup formulas to create interactive financial models and reports.  I will do some follow-up posts with these techniques as well.

Once you feel comfortable with drop-down lists, you may want to try dependent (also called cascading) lists. These are lists that change depending on what you’ve already chosen in another list. For example, you may create a list of car brands, like Toyota, Ford, and Honda. Then you can have a second list of car models that populates with specific options depending on what you choose in the first list. If you choose Toyota in the first list, you might see Corolla, Camry, and Tacoma in the second. But if you go back to the first list and choose Ford, the options in the second list can change to Mustang, Explorer, and Focus. Learn how to create dependent cascading lists here.

If you have any questions or comments about how to use drop-down lists, don’t hesitate to leave a comment below.  Thanks! 😊

Под выпадающим списком понимается содержание в одной ячейке нескольких значений. Когда пользователь щелкает по стрелочке справа, появляется определенный перечень. Можно выбрать конкретное.

Очень удобный инструмент Excel для проверки введенных данных. Повысить комфорт работы с данными позволяют возможности выпадающих списков: подстановка данных, отображение данных другого листа или файла, наличие функции поиска и зависимости.

Создание раскрывающегося списка

Путь: меню «Данные» — инструмент «Проверка данных» — вкладка «Параметры». Тип данных – «Список».

Создание выпадающего списка.

Ввести значения, из которых будет складываться выпадающий список, можно разными способами:

  1. Вручную через «точку-с-запятой» в поле «Источник».
  2. Ввод значений.

  3. Ввести значения заранее. А в качестве источника указать диапазон ячеек со списком.
  4. Проверка вводимых значений.

  5. Назначить имя для диапазона значений и в поле источник вписать это имя.

Имя диапазона.
Раскрывающийся список.

Любой из вариантов даст такой результат.



Выпадающий список в Excel с подстановкой данных

Необходимо сделать раскрывающийся список со значениями из динамического диапазона. Если вносятся изменения в имеющийся диапазон (добавляются или удаляются данные), они автоматически отражаются в раскрывающемся списке.

  1. Выделяем диапазон для выпадающего списка. В главном меню находим инструмент «Форматировать как таблицу».
  2. Форматировать как таблицу.

  3. Откроются стили. Выбираем любой. Для решения нашей задачи дизайн не имеет значения. Наличие заголовка (шапки) важно. В нашем примере это ячейка А1 со словом «Деревья». То есть нужно выбрать стиль таблицы со строкой заголовка. Получаем следующий вид диапазона:
  4. Выпадающий список.

  5. Ставим курсор в ячейку, где будет находиться выпадающий список. Открываем параметры инструмента «Проверка данных» (выше описан путь). В поле «Источник» прописываем такую функцию:

Ввод значения в источник.

Протестируем. Вот наша таблица со списком на одном листе:

Список и таблица.

Добавим в таблицу новое значение «елка».

Добавлено значение елка.

Теперь удалим значение «береза».

Удалено значение береза.

Осуществить задуманное нам помогла «умная таблица», которая легка «расширяется», меняется.

Теперь сделаем так, чтобы можно было вводить новые значения прямо в ячейку с этим списком. И данные автоматически добавлялись в диапазон.

Ввод данных из списка.

  1. Сформируем именованный диапазон. Путь: «Формулы» — «Диспетчер имен» — «Создать». Вводим уникальное название диапазона – ОК.
  2. Создание имени.

  3. Создаем раскрывающийся список в любой ячейке. Как это сделать, уже известно. Источник – имя диапазона: =деревья.
  4. Снимаем галочки на вкладках «Сообщение для ввода», «Сообщение об ошибке». Если этого не сделать, Excel не позволит нам вводить новые значения.
  5. Сообщение об ошибке.

  6. Вызываем редактор Visual Basic. Для этого щелкаем правой кнопкой мыши по названию листа и переходим по вкладке «Исходный текст». Либо одновременно нажимаем клавиши Alt + F11. Копируем код (только вставьте свои параметры).
  7. Private Sub Worksheet_Change(ByVal Target As Range)
     
    Dim lReply As Long
     
        If Target.Cells.Count > 1 Then Exit Sub
        If Target.Address = "$C$2" Then
         If IsEmpty(Target) Then Exit Sub
           If WorksheetFunction.CountIf(Range("Деревья"), Target) = 0 Then
              lReply = MsgBox("Добавить введенное имя " & _
                             Target & " в выпадающий список?", vbYesNo + vbQuestion)
              If lReply = vbYes Then
                  Range("Деревья").Cells(Range("Деревья").Rows.Count + 1, 1) = Target
              End If
           End If
         End If
    End Sub
     
  8. Сохраняем, установив тип файла «с поддержкой макросов».
  9. Сообщение об ошибке.

  10. Переходим на лист со списком. Вкладка «Разработчик» — «Код» — «Макросы». Сочетание клавиш для быстрого вызова – Alt + F8. Выбираем нужное имя. Нажимаем «Выполнить».

Макрос.

Когда мы введем в пустую ячейку выпадающего списка новое наименование, появится сообщение: «Добавить введенное имя баобаб в выпадающий список?».

Нажмем «Да» и добавиться еще одна строка со значением «баобаб».

Выпадающий список в Excel с данными с другого листа/файла

Когда значения для выпадающего списка расположены на другом листе или в другой книге, стандартный способ не работает. Решить задачу можно с помощью функции ДВССЫЛ: она сформирует правильную ссылку на внешний источник информации.

  1. Делаем активной ячейку, куда хотим поместить раскрывающийся список.
  2. Открываем параметры проверки данных. В поле «Источник» вводим формулу: =ДВССЫЛ(“[Список1.xlsx]Лист1!$A$1:$A$9”).

Имя файла, из которого берется информация для списка, заключено в квадратные скобки. Этот файл должен быть открыт. Если книга с нужными значениями находится в другой папке, нужно указывать путь полностью.

Как сделать зависимые выпадающие списки

Возьмем три именованных диапазона:

Три именованных диапазона.

Это обязательное условие. Выше описано, как сделать обычный список именованным диапазоном (с помощью «Диспетчера имен»). Помним, что имя не может содержать пробелов и знаков препинания.

  1. Создадим первый выпадающий список, куда войдут названия диапазонов.
  2. Список диапазонов.

  3. Когда поставили курсор в поле «Источник», переходим на лист и выделяем попеременно нужные ячейки.
  4. Таблица со списком.

  5. Теперь создадим второй раскрывающийся список. В нем должны отражаться те слова, которые соответствуют выбранному в первом списке названию. Если «Деревья», то «граб», «дуб» и т.д. Вводим в поле «Источник» функцию вида =ДВССЫЛ(E3). E3 – ячейка с именем первого диапазона.
  6. Второй раскрывающийся список.

    Выбор нескольких значений из выпадающего списка Excel

    Бывает, когда из раскрывающегося списка необходимо выбрать сразу несколько элементов. Рассмотрим пути реализации задачи.

    1. Создаем стандартный список с помощью инструмента «Проверка данных». Добавляем в исходный код листа готовый макрос. Как это делать, описано выше. С его помощью справа от выпадающего списка будут добавляться выбранные значения.
    2. Private Sub Worksheet_Change(ByVal Target As Range)
          On Error Resume Next
          If Not Intersect(Target, Range("Е2:Е9")) Is Nothing And Target.Cells.Count = 1 Then
              Application.EnableEvents = False
              If Len(Target.Offset(0, 1)) = 0 Then
                  Target.Offset(0, 1) = Target
              Else
                  Target.End(xlToRight).Offset(0, 1) = Target
              End If
              Target.ClearContents
              Application.EnableEvents = True
          End If
      End Sub
       
    3. Чтобы выбранные значения показывались снизу, вставляем другой код обработчика.
    4. Private Sub Worksheet_Change(ByVal Target As Range)
          On Error Resume Next
          If Not Intersect(Target, Range("Н2:К2")) Is Nothing And Target.Cells.Count = 1 Then
              Application.EnableEvents = False
              If Len(Target.Offset(1, 0)) = 0 Then
                  Target.Offset(1, 0) = Target
              Else
                  Target.End(xlDown).Offset(1, 0) = Target
              End If
              Target.ClearContents
              Application.EnableEvents = True
          End If
      End Sub
       
    5. Чтобы выбираемые значения отображались в одной ячейке, разделенные любым знаком препинания, применим такой модуль.

    6. Private Sub Worksheet_Change(ByVal Target As Range)
          On Error Resume Next
          If Not Intersect(Target, Range("C2:C5")) Is Nothing And Target.Cells.Count = 1 Then
              Application.EnableEvents = False
              newVal = Target
              Application.Undo
              oldval = Target
              If Len(oldval) <> 0 And oldval <> newVal Then
                  Target = Target & "," & newVal
              Else
                  Target = newVal
              End If
              If Len(newVal) = 0 Then Target.ClearContents
              Application.EnableEvents = True
          End If
      End Sub

    Не забываем менять диапазоны на «свои». Списки создаем классическим способом. А всю остальную работу будут делать макросы.

    Выпадающий список с поиском

    1. На вкладке «Разработчик» находим инструмент «Вставить» – «ActiveX». Здесь нам нужна кнопка «Поле со списком» (ориентируемся на всплывающие подсказки).
    2. Вставить ActiveX.

    3. Щелкаем по значку – становится активным «Режим конструктора». Рисуем курсором (он становится «крестиком») небольшой прямоугольник – место будущего списка.
    4. Элемент ActiveX.

    5. Жмем «Свойства» – открывается перечень настроек.
    6. Свойства ActiveX.

    7. Вписываем диапазон в строку ListFillRange (руками). Ячейку, куда будет выводиться выбранное значение – в строку LinkedCell. Для изменения шрифта и размера – Font.

    Скачать пример выпадающего списка

    При вводе первых букв с клавиатуры высвечиваются подходящие элементы. И это далеко не все приятные моменты данного инструмента. Здесь можно настраивать визуальное представление информации, указывать в качестве источника сразу два столбца.

We come across drop-down lists on the internet and other software applications all the time. They are useful because they limit the options available to the user, as only pre-validated items can be selected. In this post, we’ll look at how to add a drop-down list in Excel.

In Excel, there are three different types of worksheet-based drop-down lists:

  • Data validation
  • Form control
  • ActiveX

So how do you know which one you should use? As with so many things, the answer is “it depends”. Let’s take a look at these three options and understand where to use each one.

Download the example file: Click the link below to download the example file used for this post:

Data validation drop-down list

The most common form of drop-down list is a data validation list. Let’s create one of these.

Enter the values to be used in the drop-down list into a range of cells; these are known as the ‘list items’.

Then select the cell in which the drop-down should exist.

Scenario for drop-down list

Click Data > Data Validation (drop down) > Data Validation…

Data drop-down with data validation list from ribbon

The data validation dialog box opens. On the Settings tab, select list from the allow box, and enter the range of cells containing the list in the source box.

Data validation drop-down options

Click OK to close the data validation dialog box.

To use the drop-down, click on the cell containing the data validation list. We can now only select a value from the list.

Using a data validation drop-down list

Typing an invalid entry in the cell will result in an error message.

Data validation drop-down error message

Other data validation list options

There is lots of flexibility in this type of drop-down list.

List input as hardcoded values

The list doesn’t have to be on a worksheet; the values can be hardcoded into the source field. The screenshot below shows how to include the options Yes, No and Maybe without using cells; each list item is separated by a comma

Hard Coded values in Data Validation list

A drop-down list created in this way would look like this:

Yes No Maybe drop-down list

TOP TIP: If we need to use a comma in the list item text, press ALT+0130 to enter the comma, instead of a regular comma character.

List input as rows or columns

If using values in worksheet cells as the source, the list of values can be arranged in rows or columns (but not both at the same time)

List input as a named range

The list of values can be stored in a named range, provided it is a continuous range of rows or columns.

TOP TIP: If you can’t remember the name of the named range, press F3 and select from the Paste Name dialog box.

List input as a Table

I love Tables, but they don’t work as well with data validation lists as they should. Check out this post to find out how to make it work.

List input as dynamic arrays

If you have a dynamic array enabled version of Excel (only Microsoft 365 and Excel 2021), then data validation lists can contain the result of a dynamic array.

If the first cell in the output array were in cell A2, we could use =A2# as the reference in the source box. This method is excellent for advanced techniques, such as shrinking lists, or dependant lists.

Input messages

The Input Message tab of the data validation dialog box provides the settings to display a message when a user clicks the data validation cell.

The message is intended to provide guidance for the user so they know what type of information to enter.

We only need to provide a title and an input message.

Data validation drop down with input message

Make sure show input message when cell is selected is checked; otherwise, the message will not appear.

Error alerts

The purpose of a drop-down list of to select valid entries from a list. As a result, the chance of invalid data entry is significantly reduced. However, users can still enter text directly into the cell; therefore, invalid data entry is still possible.

The default message doesn’t provide any guidance regarding why the entry is invalid. But we can provide custom messages inside the Error Alert tab.

To provide a custom message, we only need to provide a title, an error message, and select a style icon.

Make sure show error alert after invalid data is entered is checked; otherwise, no error message will appear; a user could enter any value.

Data Validation - error message

Useful notes

Before we move on, I want to make you aware of a few issues with data validation drop-down lists in Excel:

Identifying the cells containing data validation

The drop-down arrow is only visible when a user clicks on the cell. Therefore, here is no visual indicator that a cell contains a drop-down list exists until it is selected. Formatting the cell may be useful to provide a better user experience.

Copy and Paste dangers

When we copy and paste cells containing the data validation to other cells, the drop-down list is transferred as part of the format. This is great if we want to create a lot of drop-down lists containing the same items.

However… now for the danger part…

A user can copy and paste values into a cell, even if those values are not in the data validation list. If a user types into a cell, the data validation process runs; if a user pastes values into a cell, the validation is not triggered at all. This is a big problem

Here is another quirk…

If the worksheet is protected, the copy and paste overwrites the value, but retains the drop-down list. However, if the sheet is not protected, copy and paste applies the format from the source cell. As a result, the data validation drop-down list can disappear completely.

Highlight all cells with invalid options

Excel can perform a check to identify any cells containing values that do not meet the data validation criteria. Click Data > Data Validation (drop-down) > Circle Invalid Data

Data validation circles

This will highlight the cells as follows:

Data validation circle invalid data

To remove the circles, click Data > Data Validation (drop-down) > Clear Validation Circles.

Form control drop-down list

Form controls can be used as another type of drop-down list in Excel. While they remove some of the negatives from data validation drop-downs, they come with their own unique challenges. VBA can be used to control form control elements; however in this post, we’ll be keeping things simple and looking at the basic non-VBA functionality (which is still pretty powerful).

Let’s start by creating a form control drop-down list. These are contained within the Developer ribbon.

Click Developer > Insert > Combo Box (Form Control)

Developer - Insert Form Control Drop-Down

The mouse pointer will change to a cross. Click and hold the mouse while you draw the location to place the drop-down list. Holding the ALT key while placing the object will also snap the drop-down to the grid.

Right-click on the drop-down list and select format control…

Right-click Form Control for options

The format object window will open. Click on the control tab. The key fields are:

  • Input range – the range of cells to include in the drop-down list.
  • Cell link – the cell in which to output the value.

Format Object - Options

The cell selected for the cell link shows the chosen position in the drop-down box. As East is the third item in the list, cell F2 displays 3.

Linked cell show index of select item

The biggest issue with the form control drop-down is that the cell link shows the position in the drop-down rather than the value itself. By using the INDEX function and the input range cells, we can retrieve the value from the list.

INDEX function to display result as text

The formula in cell G2 is:

=INDEX(A2:A6,F2)

Input range options

With Form Control drop-down lists, the input range can be a standard cell range or a named range. Hardcoded lists and dynamic arrays are not compatible. However, we can use a dynamic array placed inside a named range as a workaround.

Useful notes

If we wish to have lots of drop-down lists, we can copy and paste a form control object. However, we must go into each drop-down individually to repoint to a new cell link.

We cannot enter text into the drop-down list; therefore, it is not possible to select an invalid entry.

Form controls are not compatible with Excel Online.

ActiveX drop-down list

Now for the final type of drop-down list in Excel; ActiveX drop-down list.

Click Developer > Insert > Combo Box (ActiveX Control)

Insert ActiveX Drop-Down

Just like the form control option shown above, draw the drop-down box on the worksheet.

Right-click on the drop-down and select properties from the menu.

ActiveX Drop-Down Properties

The properties dialog box opens. The critical parameters for our purposes are LinkedCell and ListFillRange. These are similar to the form control drop-down list; enter equivalent ranges into these fields. Click on the [x] in the top right corner to close the Properties window.

VBA Properties for ActiveX drop-down

Clicking Developer > Design Mode toggles between using and editing the drop-down list. When in design mode, the drop-down can be edited, but not used. Vice versa, when in display mode, the drop-down can be used, but not edited.

Developer - Design Mode

Unlike the form control version, the ActiveX drop-down displays the selected value directly in the linked cell.

ActiveX inserts value into a cell

ActiveX has more extensive formatting options than form controls.

Useful notes

ActiveX drop-down boxes have many features to be aware of:

  • When in design mode, the ActiveX drop-down can be copied or deleted, but not when in display mode.
  • ActiveX doesn’t work on a Mac or Excel Online. So, if you want a genuinely cross-platform workbook, this is not the option for you.

Which option to choose?

So, which option should you choose for a drop-down list in Excel? As I said in the introduction, it depends. My general advice is:

  1. Avoid ActiveX, if possible.
  2. Use Form Controls for single-cell selections where strict input is required.
  3. Use Data Validation, where a drop-down may need to be copied.

That’s just a basic rule I use. In all cases, suitable worksheet protection needs to be applied to prevent accidental changes. Ultimately, you’ll need to experiment with all the options and work out what is best for your circumstances.


Headshot Round

About the author

Hey, I’m Mark, and I run Excel Off The Grid.

My parents tell me that at the age of 7 I declared I was going to become a qualified accountant. I was either psychic or had no imagination, as that is exactly what happened. However, it wasn’t until I was 35 that my journey really began.

In 2015, I started a new job, for which I was regularly working after 10pm. As a result, I rarely saw my children during the week. So, I started searching for the secrets to automating Excel. I discovered that by building a small number of simple tools, I could combine them together in different ways to automate nearly all my regular tasks. This meant I could work less hours (and I got pay raises!). Today, I teach these techniques to other professionals in our training program so they too can spend less time at work (and more time with their children and doing the things they love).


Do you need help adapting this post to your needs?

I’m guessing the examples in this post don’t exactly match your situation. We all use Excel differently, so it’s impossible to write a post that will meet everybody’s needs. By taking the time to understand the techniques and principles in this post (and elsewhere on this site), you should be able to adapt it to your needs.

But, if you’re still struggling you should:

  1. Read other blogs, or watch YouTube videos on the same topic. You will benefit much more by discovering your own solutions.
  2. Ask the ‘Excel Ninja’ in your office. It’s amazing what things other people know.
  3. Ask a question in a forum like Mr Excel, or the Microsoft Answers Community. Remember, the people on these forums are generally giving their time for free. So take care to craft your question, make sure it’s clear and concise.  List all the things you’ve tried, and provide screenshots, code segments and example workbooks.
  4. Use Excel Rescue, who are my consultancy partner. They help by providing solutions to smaller Excel problems.

What next?
Don’t go yet, there is plenty more to learn on Excel Off The Grid.  Check out the latest posts:

Понравилась статья? Поделить с друзьями:
  • Locking in a cell in excel
  • Listobjects vba excel что это
  • Locking form in word
  • Locked scrolling in excel
  • Listobjects add vba excel