Drop down menu from excel

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.

Содержание

    • 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? Одной из наиболее полезных функций проверки данных является возможность создания выпадающего списка, который позволяет выбирать значение из предварительно определенного перечня. Но как только вы начнете применять это в своих таблицах,…

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?

Содержание

  • Создание дополнительного списка
  • Создание выпадающего списка с помощью инструментов разработчика
  • Связанные списки
  • Вопросы и ответы

Выпадающий список в Microsoft Excel

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

Создание дополнительного списка

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

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

tablitsa-zagotovka-i-spisok-v-microsoft-excel

Выделяем данные, которые планируем занести в раскрывающийся список. Кликаем правой кнопкой мыши, и в контекстном меню выбираем пункт «Присвоить имя…».

Присвоение имени в Microsoft Excel

Открывается форма создания имени. В поле «Имя» вписываем любое удобное наименование, по которому будем узнавать данный список. Но, это наименование должно начинаться обязательно с буквы. Можно также вписать примечание, но это не обязательно. Жмем на кнопку «OK».

Создание имени в Microsoft Excel

Переходим во вкладку «Данные» программы Microsoft Excel. Выделяем область таблицы, где собираемся применять выпадающий список. Жмем на кнопку «Проверка данных», расположенную на Ленте.

Проверка данных в Microsoft Excel

Открывается окно проверки вводимых значений. Во вкладке «Параметры» в поле «Тип данных» выбираем параметр «Список». В поле «Источник» ставим знак равно, и сразу без пробелов пишем имя списка, которое присвоили ему выше. Жмем на кнопку «OK».

Параметры вводимых значений в Microsoft Excel

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

Выпадающий список в программе Microsoft Excel

Lumpics.ru

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

Второй способ предполагает создание выпадающего списка с помощью инструментов разработчика, а именно с использованием ActiveX. По умолчанию, функции инструментов разработчика отсутствуют, поэтому нам, прежде всего, нужно будет их включить. Для этого, переходим во вкладку «Файл» программы Excel, а затем кликаем по надписи «Параметры».

Переход в параметры Microsoft Excel

В открывшемся окне переходим в подраздел «Настройка ленты», и ставим флажок напротив значения «Разработчик». Жмем на кнопку «OK».

Включение режима разработчика в Microsoft Excel

После этого, на ленте появляется вкладка с названием «Разработчик», куда мы и перемещаемся. Чертим в Microsoft Excel список, который должен стать выпадающим меню. Затем, кликаем на Ленте на значок «Вставить», и среди появившихся элементов в группе «Элемент ActiveX» выбираем «Поле со списком».

Выбор поля со списком в Microsoft Excel

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

Форма списка в Microsoft Excel

Затем мы перемещаемся в «Режим конструктора». Жмем на кнопку «Свойства элемента управления».

Переход в свойства элемента управления в Microsoft Excel

Открывается окно свойств элемента управления. В графе «ListFillRange» вручную через двоеточие прописываем диапазон ячеек таблицы, данные которой будут формировать пункты выпадающего списка.

Свойства элемента управления в Microsoft Excel

Далее, кликаем по ячейке, и в контекстном меню последовательно переходим по пунктам «Объект ComboBox» и «Edit».

Редактирование в Microsoft Excel

Выпадающий список в Microsoft Excel готов.

Выпадающий список в приложении Microsoft Excel

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

Протягивание выпадающего списка в Microsoft Excel

Связанные списки

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

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

Таблицы в Microsoft Excel

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

Присваивание имени в Microsoft Excel

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

Ввод данных в Microsoft Excel

Во второй ячейке тоже запускаем окно проверки данных, но в графе «Источник» вводим функцию «=ДВССЫЛ» и адрес первой ячейки. Например, =ДВССЫЛ($B3).

Ввод данных для второй ячейки в Microsoft Excel

Как видим, список создан.

Список создан в Microsoft Excel

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

Таблица создана в Microsoft Excel

Всё, таблица создана.

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

Понравилась статья? Поделить с друзьями:
  • Drop down menu for word
  • Drop down lists in word
  • Drop down list in excel что это
  • Drop down list in excel как создать
  • Drop down list excel dependent