Как сделать dropdownlist в 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.

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.

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.

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

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.

On the Settings tab, in the Allow box, click List.

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:

If it’s OK for people to leave the cell empty, check the Ignore blank box.

Check the In-cell dropdown box.

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.

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.

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 and Warning will show a message with this icon .

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.»

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 the list of entries for your drop-down list is on another worksheet and you want to prevent users from seeing it or making changes, consider hiding and protecting that worksheet. For more information about how to protect a worksheet, see Lock cells to protect them.

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.

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.

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.

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

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

On the Data tab, under Tools, click Data Validation or Validate.

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.

Click the Settings tab, and then in the Allow pop-up menu, click List.

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.

Press RETURN or click the Expand button to restore the dialog box, and then click OK.

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.

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.

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.

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

Go to the Data tab on the Ribbon, then click Data Validation.

On the Settings tab, in the Allow box, click List.

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:

If it’s OK for people to leave the cell empty, check the Ignore blank box.

Check the In-cell dropdown box.

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.

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.

Читать еще:  Как сделать чтобы в excel?

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, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.

Excel Drop Down Lists

Drop Down Lists In Excel 2010

A drop down list in Excel presents a number of options for the user to select from. The advantages of eliciting a response from the user in this way are that:

  • the entries in the list give the user a clue about what values are allowed or expected
  • it’s easier for the user to select an option than to type one into a cell
  • it reduces typos that the user makes
  • you can make the list dynamic by populating it with entries from different cells elsewhere in the workbook

To indicate that a drop down list is present, Excel displays a down arrow to the right of the cell.

Create A Drop Down List From A Range Of Cells

To create a drop down list from the contents of a range of cells, first of all type in the values you want to appear in the list in a single row or single column in your workbook. Make sure that there are no blank entries in the list.

Be aware that the order that you type in the data is the order that the values will appear in the drop down list so perform any sorting you need before you go any further.

Select the cell where you want the list to go and then click the Data tab and go to the Data Tools group. Click the Data Validation button and in the Data Validation window ensure that you’re working on the Settings tab.

In the Allow box select List and then enter the range of cells in the Source box. To get the range into the box, you can also click on the cell selector button and then drag over the cell range you need. Make sure that the range of cells is preceded by an equals sign like this: =$F$8:$F$13

Make sure that the In-cell drop down box is checked and if you want the user to be able to make a blank selection (i.e. leave it blank) then check the Ignore blank box.

If you want to display an informational message for the user when they make the drop down list cell active, go to the Input Message tab. Check the Show input message when cell is selected box. Then enter values for the title an input message itself.

If you want to display an error message after invalid data has been entered, click on the Error Alert tab. Ensure that the Show error alert after invalid data is entered box is checked and select the most appropriate Style:

  • To display an information message that does not prevent entry of invalid data, select Information.
  • To display an information message that does not prevent entry of invalid data, select Warning.
  • To prevent the entry of invalid data, select Stop.

Type in a title for the error message and also some descriptive text.

To remove a drop down list from a cell, make the cell active and then click to the Data tab. Go to the Data group and then click the Data Validation button. On the Settings tab, click the Clear All button at the bottom.

Create A Drop Down List Using Static Values

If you want a drop down list of static values that don’t change, and aren’t dependent on the contents of other cells, you can type in the values directly. Select the cell where you want the list to go and then click the Data tab and go to the Data Tools group. Click the Data Validation button and in the Data Validation window ensure that you’re working on the Settings tab. In the Allow box select List and then type in the value you want to display in the list into the Source box. Separate the values with a comma. Review the steps above if you need to add any informational or error messages. Click OK when finished.

If you typed in an input message, it will be displayed when the cell becomes active, like this:

The user will need to click on the down arrow to display the drop down list, and then they can click on the entry they want to select it.

Create a Drop Down List in Excel

I love using drop down lists in Excel! They are extremely simple to create and are a great way to make a spreadsheet easier to use. In this article, I’ll first show how to create an in-cell drop-down list using data validation, and then I’ll show some examples that demonstrate awesome things you can do with drop downs.

To see some of the examples from this article in action, download the Excel file below.

Watch the Video

Create a Simple Drop-Down List

You can create an in-cell drop down list in Excel by following these 4 easy steps:

  1. Select the cell, or range of cells, where you want to add the drop-down list.
  2. Go to Data > Validation > Settings tab (see image below)
  3. Select «List» from the Allow: drop-down box
  4. Enter your list in the Source: field using a comma to separate the items, or select a range of cells from your worksheet.

This approach is great for simple Yes/No options and other lists that appear only once in your spreadsheet.

The problem with this approach is that if you use this in a lot of cells and later want to update the list, you have to update all cells that use the list and there is a good chance you’ll miss one. The more elegant approach is to use a reference to a range, or even better than that — a named range.

Defining a Drop-Down List using a Range

Instead of manually entering the list of items in the data validation dialog box, you can reference a range of cells. For example, let’s say I have a separate worksheet with my list defined in cells A1:A3 as shown below. In this case, I’ve named the range «myList». You can later hide the worksheet containing your list to keep your workbook looking nice and clean or to prevent a user from changing the list.

In the data validation dialog box, instead of entering the list manually, you enter a reference to the named range in the Source field as shown below:

You could use a reference for the Source field like =Sheet2!$A$1:$A$3, but I usually prefer to name the list. Why? If you want to change the range, you only need to edit the defined name (via Formulas > Name Manager) rather than finding and editing all cells that use that particular data validation.

Читать еще:  Анализ что если в excel как сделать

Note: When using a named range for a data validation list, the named range must be defined as a reference to a range of cells, or it must be a formula like OFFSET or INDIRECT or INDEX that returns a reference. If you’re thinking of getting fancy and want to define a name without a cell reference such as =<"Yes","No">, the drop-down list won’t work.

Another bit of trivia: In old versions of Excel, using a named range was the only way for a drop-down list to reference a range on a different worksheet.

Check Boxes and Star Ratings with Excel Drop-Down Lists

The font used in the drop-down list cannot be changed, so it is always just a black sans serif font. This means that you can’t show different colors and fonts within the drop-down list. What I think is awesome, though, is using Unicode Character Symbols to do fun things with drop-down lists, such as star-ratings using ★ or checkboxes using the characters √, ✔, ☐, ☑ or ☒.

Important: One of the main reasons I like to use checkbox-style drop-down lists is for compatibility and ease-of-use with Excel Online and the mobile Excel apps (Form Field checkboxes don’t work in Excel Online or mobile apps). Also, when using a touch screen device, I think the drop-down checkbox is easier and more fun to use than entering an «X». By the way, if you’d like to see Microsoft add a checkbox as a data validation option, vote for that here.

Example 1: Using a Drop Down List to create a Checkbox field

This example comes from one of my Task List templates. The Source field is just «☐,√» (without the quotes).

Example 2: Choose a Star Rating using a Drop Down Menu

For a star rating, you can use «★★★★★,★★★★,★★★,★★,★» in the Source field. This example comes from the Feature Comparison template.

Including a Blank Value and Using Relative References

An in-cell drop down will ignore blanks if you enter text manually into the Source field (like » ,Yes,No»). So, if you want a blank value as an option, use a reference to a range as in the examples below.

Usually, you will use absolute references like $C$76:$C$77 for the Source in your drop-down list. However, there may be times when you want the drop-down Source to change when you copy and paste the cell. In the example above, the drop-downs use a relative reference in the Source field (no $ signs in the reference). This makes it easy to create other checkbox examples by just copying the cells to the right.

Using a relative reference is important when creating dependent lists which will be shown a little later in this article.

Copying and Pasting Drop-Down Lists in Excel

When you copy and paste cells, the data validation will also be pasted, but you can’t use the Format Painter to copy and paste data validation. Instead, if you only want to copy and paste the drop-down list (and not formulas or formatting), then after copying the cell, use Paste Special and select the Validation option as shown in the image.

Customizable Drop Down Lists Using Dynamic Ranges

I like creating templates that allow a person to customize lists, such as meals for a Meal Planner or accounts for an Account Register or products for a PO with Price List.

To allow for a variable number of items within the Source range, you could use a very large range like =$A$1:$A$1000, but the drop-down would end up having a crazy amount of blanks. Instead, you can create a dynamic range that extends the list to the last value in the range.

Here is a basic example:

You can see that even though the list range $C$127:$C$133 includes two blank cells, the drop-down only extends to row 131 (the last text value in the Categories column).

Here’s how to do it:

Step 1: Create a Dynamic Named Range.

Go to Formulas > Name Manager and create a range named category_list using the following formula in the Refers To field, replacing label_cell and list_range with the appropriate cell references.

Here is the specific formula used in the example.

Step 2: Use the Named Range in the Source field for the drop-down list.

See my article «Dynamic Named Ranges» to learn more about the various formulas you can use. The formula used in the above example works well for lists that include only text values.

Dependent Drop-Down Lists Using CHOOSE or INDIRECT

A dependent drop-down list is a list that changes based on the value of another cell, which might also contain a drop-down list of its own. The Source for a drop-down list can be a formula, and that is the key to making the dependent list. As I mentioned before, the formula must return a reference, so there are only a few types of formulas that will work for drop downs. I personally prefer using CHOOSE or INDIRECT.

The example below is based on an account register where the idea is to choose categories for each transaction. The Type column contains a drop-down list that references cells C179:D179 (the labels «Expense» and «Income»). We want the dependent drop down box in the Category column to use the list of expenses if the Type is «Expense» and the list of income categories if the Type is «Income.»

Here is an example showing the CHOOSE method:

The formula uses a relative reference for the type cell and absolute references for the type_values, expense_range and income_range like this:

Alternatively, we could create dynamic named ranges called Expense_range and Income_range and then use the following formula for the Source:

You can use named ranges within the CHOOSE formula as well, so I’m not sure whether one method is better than the other. Some may argue that CHOOSE is better because INDIRECT is a volatile function, but I don’t think that matters for drop-down lists.

See the Grocery Price Book template for a practical example of how dependent drop-down lists can be used in a spreadsheet.

Fancy Dynamic Drop-Down Lists

If the previous examples aren’t fancy enough for you, my article «Dynamic Drop-Down Lists» explains how to create drop-down lists that change based on user input, the date, check number, etc.

Searchable Drop-Down Lists

If your drop-down list is really long, it can be difficult to find the item you are looking for. Google Sheets provides a great solution, though not a perfect one (yet). In Sheets, you can start typing into the cell and the drop-down list will automatically filter based upon what you type . as long as it is the start of one or more of the words in the list.

For example, let’s say your list contains the names Abe Lincoln, George Washington, Harry Truman, and J. Edgar Hoover. As soon as you type «h», the list will be shortened to Harry Truman and J. Edgar Hoover, but Sheets does not recognize the «h» in Washington.

Excel: Using a fairly complicated trick, you CAN create a searchable drop-down list in Excel. See this youtube video. If you’d like to encourage Microsoft to add a searchable drop-down list as a feature, vote for this suggestion on excel.uservoice.com.

More Examples

My article Add Cool Features to Your To Do Lists in Excel shows a few other examples, like using conditional formatting combined with a drop-down box to select a priority value in a to do or task list.

Читать еще:  Как сделать фильтр в сводной таблице excel?

Example 1: This Homework To Do List allows you to choose a High, Medium, or Low value in the Priority column. There are also examples of this on the Task List template page.

Example 2: This Task List Template uses conditional formatting icon sets for the Priority column and a drop-down list to choose a value between 1 and 4.

More Examples: Drop-down lists are a common feature in many of my templates, including the Meal Planner, Money Manager, and many financial calculators. You can download the templates to see how the drop-down lists are created.

The Customer List Template page explains how to copy a customer list worksheet into a spreadsheet, create a drop-down list showing customer names, and then add lookup formulas to display the information for the chosen customer.

Drop Down List in Excel

Dropdown list in excel are the options available in each cell for a user to chose as an input or any parameter, it is a very unique way to take a value from the user when we want to limit the responses so that there are fewer chances for a garbage value to be present in our data, it is like we are predefining the values a user can input, there are three ways to make a drop-down list in excel.

Drop Down List in Excel (Table of Contents)

What is Drop Down List in Excel?

I know everybody in excel encountered the problem of not clear data entry from other departments. For example, instead of typing “Ravish” someone typed “Ravish ” The mistake they have done here is they entered one extra space after the name.

How cool it is if you can give a pre-determined list to the user and not allowing them to enter any manual entries, instead they select only from the list given and not from anywhere else – known as Drop Down List in Excel.

The typical example is: You are doing an online survey and for all the questions, you need either YES or NO as the answer. We are humans; instead of writing YES or NO, we write our own stories.

How to Create Drop Down List in Excel?

Let’s understand how to create drop down list in excel with examples.

Drop Down List in Excel allows you to create a series of the list and restricts the user from manual entry. By creating a DROPDOWN LIST, we can allow the users to answer those questions only from the pre-determined list.

In excel dropdown list is also called as “Data Validation”, which is located under Data tab we have Data Validation.

Follow this article to unleash the power of Drop Down List in Excel.

Example #1 – Creating a Static Drop-Down List in Excel

This is Ok, let me create a simple dropdown list. I have the city name and revenue details. I want to create a dropdown list for all the cities.

Now in D2 cell, I want to create a dropdown list of all the cities available from A2 to A14.

Step 1: Select the cell D2.

Step 2: Go to Data then Data Validation and Data Validation

Shortcut to open the Data Validation is:

Step 3: once you click on Data Validation, it will open the below window.

Step 4: Under Settings and allow: click on the drop-down list and select LIST.

Step 5: Once you selected LIST it will how the SOURCE section. Under this SOURCE section, select the range of cities.

Step 6: Click OK it will create the selected list of drop-down in the cell D2.

Step 7: Now try to enter any value in the cell D2 it will show the result, as “The Value you entered is not valid”.

Step 8: Instead of excel gives the information we can modify our own information to the users if they enter the values manually.

Select the cell D2 and press ALT + A + V + V then Go to Input Message

Step 9: In this, box Title: “You Cannot Enter the Values”

Input Message: Please select from the list only.

Step 10: Now select the cell D2. As soon as you select the cell, D2 it will show the information you have given entered.

Step 11: Again select the cell and press ALT + A + V +V and go to Error Alert.

Step 12: In the Style option you can stop, give Warning, and Information icons. You can select any one of them.

Step 13: Now under Title: mention your error title and under Error message mention the message you want to show.

Step 14: Now try entering data manually it will show the error message you have created.

Example #2 – Creating a Dynamic Drop Down List in Excel

We can create the dynamic dropdown list. Dynamic means as data increases our dropdown list also should show the updated values.

Take the previous data as for this example as well. Add two more city names.

For the previous list, I have added 2 more cities, Napier and Geneva.

If you go to our excel drop down list, cell (D2) and click on the drop down list in excel. It will only show the previously selected list, not the updated one.

It is showing the list until Cape Town only. It is not showing newly entered values.

In order to make our drop down list up to date, we need to create Named Range and then create the drop down list in excel.

Step 1: Go to Formula then Name Manager.

Step 2: Click on Name Manager and select New.

Step 3: Once you click on New. Apply formula as shown in the below image.

Step 5: In the SOURCE instead of selecting the range give the Name we have created in Step 3.Step 4: Now select the cell D5 and press ALT + A + V+ V and select list.

Step 6: Now enter two more city names and check the drop-down list.

I have entered Haryana and Colombo to the list. If I click on the dropdown list in excel, it is capturing the new values that I have entered in the list.

Things to Remember

  • We can create the dynamic drop-down list by using excel tables.
  • We can create a dynamic drop-down list by using the INDIRECT function.
  • We can directly enter the values to list directly instead of selecting the range of values.
  • We can copy and paste the drop-down cell to any other cell.
  • We can also create a dependent drop down list in excel.
  • Once the name manager has created in the source range in data validation we just type F3 it will open up the entire name manager list. Here you can select the name you want.

Recommended Articles

This has been a step by step guide to Drop Down List in Excel. Here we discuss how to create Drop Down List in Excel (static and dynamic list) using examples and downloadable excel templates. You may also look at these useful excel tools –

Ссылка на основную публикацию
Adblock
detector