Computer >> Máy Tính >  >> Phần mềm >> Office

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

Trong Microsoft Excel, danh sách thả xuống là một trong những công cụ cho phép bạn xác thực dữ liệu của mình trong trang tính. Nó giúp bạn tiết kiệm rất nhiều thời gian khi chọn một phạm vi giá trị cụ thể. Nếu ô của bạn chỉ nhận các giá trị cụ thể, bạn không cần phải nhập lại nhiều lần. Thay vào đó, bạn có thể tạo danh sách thả xuống để xác thực dữ liệu trong trang tính Excel của mình. Trong hướng dẫn này, bạn sẽ học chính xác cách tạo danh sách thả xuống đầu tiên của mình.

Hướng dẫn này sẽ đi vào điểm với các ví dụ phù hợp và hình ảnh minh họa phù hợp. Vì vậy, hãy đọc toàn bộ bài viết để làm giàu thêm kiến ​​thức của bạn.

Tải xuống sổ làm việc thực hành này.

Xác thực dữ liệu trong Excel là gì?

Giờ đây, xác thực dữ liệu cho phép bạn kiểm soát đầu vào của mình trong một ô. Khi bạn có các giá trị giới hạn để nhập một trường, bạn có thể sử dụng danh sách thả xuống để xác thực dữ liệu của mình. Bạn không phải nhập dữ liệu bằng cách nhập lại nhiều lần. Danh sách xác thực dữ liệu cũng đảm bảo rằng đầu vào của bạn không có lỗi.

Bây giờ, tại sao nó được gọi là xác thực dữ liệu? Vì nó đảm bảo chỉ những dữ liệu hợp lệ mới được đưa vào danh sách.

Nó rất hữu ích cho những người dùng được giới thiệu với tập dữ liệu. Họ không phải nhập dữ liệu theo cách thủ công. Thay vào đó, họ có thể chọn bất kỳ giá trị nào từ danh sách thả xuống mà bạn đã tạo.

8 phương pháp tạo danh sách thả xuống để xác thực dữ liệu trong Excel

Trong các phần sau, bạn sẽ học cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu theo nhiều cách khác nhau. Tôi khuyên bạn nên tìm hiểu và áp dụng tất cả các phương pháp này trong tập dữ liệu của mình. Tôi hy vọng nó sẽ phát triển kiến ​​thức Excel của bạn. Hãy bắt đầu.

1. Tạo danh sách thả xuống trong một ô trong Excel

Trong phần này, bạn sẽ học cách tạo một danh sách thả xuống đơn giản trong Excel. Tôi sẽ tạo xác thực dữ liệu cho một ô duy nhất tại đây.

Hãy xem ảnh chụp màn hình sau:

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

Tại đây, chúng tôi sẽ tạo danh sách xác thực dữ liệu Excel.

📌 Các bước

  • Đầu tiên, nhấp vào Ô B5 .

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

  • Sau đó, chuyển đến Dữ liệu chuyển hướng. Sau đó, từ Công cụ dữ liệu , nhấp vào Xác thực dữ liệu . Bạn sẽ thấy hộp thoại Xác thực dữ liệu.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

  • Bây giờ, từ Cho phép danh sách thả xuống. Chọn Danh sách .

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

  • Tại đây, chúng tôi nhập dữ liệu hợp lệ có thể chấp nhận được đối với ô. Tôi đã đưa ra một số dữ liệu mẫu bằng cách sử dụng dấu phẩy. Bạn cũng có thể sử dụng danh sách, bảng, v.v. mà tôi sẽ thảo luận sau.
  • Tiếp theo, nhấp vào OK .

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

  • Như bạn có thể thấy biểu trưng thả xuống bên cạnh ô. Bây giờ, hãy nhấp vào đó.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

Như bạn có thể thấy, danh sách chúng tôi đã tạo được hiển thị ở đây. Bây giờ, hãy nhấp vào bất kỳ dữ liệu nào bạn muốn nhập vào ô. In this way, you can create an Excel data validation using the drop down list.

Đọc thêm: How to Apply Multiple Data Validation in One Cell in Excel (3 Examples)

2. Create Drop Down List in Multiple Cells

Now, we have created a drop down list for a single cell. But, what if we want to do that for multiple cells? It is pretty simple. According to us, you can follow two methods.

2.1 Create Using Fill Handle

Now, you can also call this the copy-paste method. You can copy the cell that has data validation and paste it to another cell. The resulting cell will also have the data validation drop down in it.

Or you can use the fill handle to copy the data validation in multiple cells.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

You can drag down the Fill handle icon to copy the data validation list in a particular column.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

After that, you will see all the cells are having the data validation list in them. Now, click on the icon and select your data.

2.2 Select Multiple Cells and Create Drop Down List

Now, we have created drop down list for data validation for a single cell. Here, you can follow the same process to create a list. Just a simple tweak. Select all the cells that you want to validate.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

Follow, any of the methods to create an Excel drop down list for data validation.

Read More:Data Validation Drop Down List with VBA in Excel (7 Applications)

3. Drop Down List from Comma Separated Values

Now, to create a drop down list you have to provide some values from which users can choose. You can give those values in various forms. One of them is using the Comma Separated Values that we showed earlier.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

Here, in the Source field, you have to enter the values you want limited to the cell. Here, we provided the values with the separator comma.

Đọc thêm: How to Make a Data Validation List from Table in Excel (3 Methods)

4. Drop Down List from a Range of Values

Now, typing the source values one by one is a very hectic thing. Instead of that, you can select the source values from a list. In this section, I am going to show you that.

📌 Steps

  • First, create your list of values.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

  • Then, select the range of cells where you want to apply the data validation.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

  • After that, go to the Data Then, from the Data Tools group, click on Data Validation . You will see a Data Validation hộp thoại.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

  • In the Allow drop down, select List . Then, in the Source field select the range of cells where your list is located. Then, click on OK .

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

Finally, you will see the drop down list in those cells. In this way, you can use a range of values to create data validation in Excel.

Đọc thêm: How to Use Named Range for Data Validation List with VBA in Excel

Similar Readings:

  • Excel Data Validation Alphanumeric Only (Using Custom Formula)
  • Data Validation Based on Another Cell Value
  • Use Custom VLOOKUP Formula in Excel Data Validatio n

5. Use List on Another Sheet

Previously, we created a drop down list where our range of values was in the same sheet. Now, you can also choose the values in the source field from another sheet to create a data validation.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

As you can see from the screenshot, we have used a list from a different sheet named “Range of values ”. And in the source field, you can see the sheet name and the cell references.

Đọc thêm: How to Use Data Validation List from Another Sheet (6 Methods)

6. Error Handling in Data Validation

Let’s enter an item that is not on our list:

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

Now, press Enter . You will see the following message:

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

As our item was not on the list, it won’t take this as a valid item. This is an Error Alert in data validation. You can customize it in various ways.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

In Microsoft Excel, you can show three types of error messages. These are Stop, Warning, and Information .

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

Select the Title and Error Message you want to show when a user gives an invalid input.

6.1 Stop Style

It will appear when the user gives an invalid entry. This option allows the user to retype or cancel the attempt.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

6.2 Warning Style

The warning style shows a message that gives a user a choice to allow the item that is not in the list you selected.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

6.3 Information Style

The Information style shows a message that automatically authorizes the item no matter what the user gave. It shows the user the data validation rules.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

Đọc thêm: Apply Custom Data Validation for Multiple Criteria in Excel (4 Examples)

7. Allow Entries That Are Not in Excel Drop Down List

When you add the data validation, an error alert is automatically turned on. That means you can not enter invalid items in the column. Now, you may be in a situation where you have to allow the user to enter items that are not selected in the list. In this situation you can follow two methods:

7.1 Turn Off Error Checking

To allow the entries that are not on the list, you can turn off the error checking option. By doing that, Excel won’t show any error message for other values and it will accept any item given by the user.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

In the Data Validation dialog box, select the Error Alert tab. Then uncheck the option as we showed in the picture.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

After that, you can enter any other values outside the list to in the Excel data validation list.

7.2 Choose Other Error Alerts Options

Another useful way to allow other entries is to choose different error alert options. We have already shown you different types of error alerts. According to me, choose the Information style.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

This error alert allows you to enter different items in the column.

Đọc thêm: Excel Data Validation Drop Down List with Filter (2 Methods)

8. Adding New Data Source in the Drop Down List

Now, you may face any situation where you have to expand your list. You have to allow a new data source for your drop down list in Excel.

Take a look at the following screenshot:

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

Here, we have extended our list with extra two items. Now, you have to tell Excel that we extended our list.

You can again select all the cells and create a data validation with the new list. It will also do the work. Now, there is another easy way to solve this.

📌 Steps

  • First, select the first cell of the column.
  • After that, go to the Data Then, from the Data Tools group, click on Data Validation . You will see a Data Validation dialog box.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

  • Here, select the new source of your list.
  • Then, check the box “Apply these changes to all other cells with the same settings ”. It will apply your new data source to all the cells that have data validation in the column.
  • Now, click on OK and check your new data source is added or not.

Cách tạo danh sách thả xuống trong Excel để xác thực dữ liệu (8 cách)

As you can see, our new data source is added in the drop down list in Excel.

Related Content: Excel VBA to Create Data Validation List from Array

💬 Things to Remember

You can copy any cell with data validation and paste it to other cells. The resulting cells will have the same drop down list.

Kết luận

To conclude, I hope this tutorial has provided you with a piece of useful knowledge to create Excel data validation using the drop down list. We recommend you learn and apply all these instructions to your dataset. Download the practice workbook and try these yourself. Also, feel free to give feedback in the comment section. Your valuable feedback keeps us motivated to create tutorials like this.

Don’t forget to check our website Exceldemy.com for various Excel-related problems and solutions.

Keep learning new methods and keep growing!

Related Articles

  • How to Use IF Statement in Data Validation Formula in Excel (6 Ways)
  • Use Data Validation in Excel with Color (4 Ways)
  • [Fixed] Data Validation Not Working for Copy Paste in Excel (with Solution)
  • How to Remove Blanks from Data Validation List in Excel (5 Methods
  • Default Value in Data Validation List with Excel VBA (Macro and UserForm)