Apa itu Data Validation di Excel?

Apa itu Data Validation di Excel?

Validation > Drop Downs > Dependent

Make Excel Drop Down List in Worksheet Cell

Create a drop down list of items in a cell, with Excel's Data Validation feature. This will make data entry easier, and reduce input errors and typing mistakes. Video tutorials and step by step instructions for data validation dropdown lists are below

Apa itu Data Validation di Excel?

  • What is Data Validation?
  • Video: Create Drop Down List in Cell
  • Video: Use List on Different Sheet

  • Use a Delimited List
  • Allow Entries Not in Drop Down List
  • Get the Sample File

What is Data Validation?

In Microsoft Excel, the data validation feature helps you control what can be entered in your worksheet. For example, you can:

  • create a drop down list of items in a cell
  • restrict entries, such as a date range or whole numbers only
  • create custom rules for what can be entered

In this tutorial, you'll see how to create a drop down list of choices in a cell, like the list of employee names shown below.

Apa itu Data Validation di Excel?

Create a Drop Down List in a Cell

To create a drop down list in Excel, you can name a list of items, based on a named Excel table. Then, use that list as the source for the Data Validation drop down list. If you don't want to create a named table, you can follow the instructions in the named range section below. Watch the steps in this short video, and the written instructions are below the video

How to Create a Drop Down List

With Data Validation, you can create a dropdown list of options in a cell. There are 3 easy steps:

1. Create a Table of Items OR Create a List

2. Name the List

3. Create the Drop Down

Note: Data validation is not foolproof. It can be circumvented by pasting data into the cell, or by choosing Clear > Clear All, on the Ribbon's Home tab.

1. Create a Table of Items

The easiest way to create and maintain the list of options, is to type them on a worksheet. You can do this on the sheet that will contain the drop down lists, or on a different sheet. In this example, the list will be stored on a sheet named Lists.

NOTE: A data validation list can show up to show 32,767 items from a list on the worksheet.

  1. Type a heading for the list -- Employees in this example
  2. Immediately below the heading cell, in single column, type the entries you want to see in the drop down list. Do not leave blank cells between the entries.

    Apa itu Data Validation di Excel?

  3. Select a cell in the list, and on the Ribbon's Insert tab, click Table

    Apa itu Data Validation di Excel?

  4. Add a check mark in "My table has Headers" and click OK

    Apa itu Data Validation di Excel?

The table is now a Named Excel Table.

2. Name the List

Next, you will create a named range that does not include the heading cell in the table. This named range will be dynamic -- it will adjust automatically if items are added to or deleted from the list.

You can use the Name Manager, as shown in the video, or use the Name Box. Both methods are described below. The Name Box method is quicker, but you can't add a comment.

Use the Name Manager

This is the method shown in the video. You can set a name, scope and comments.

  1. Select one of the cells in the list of employee names.
  2. On the Ribbon, click the Formulas tab, and in the Defined Names group, click Define Name
  3. Apa itu Data Validation di Excel?

  4. In the New Name dialog box, type a one-word name for the selected range, e.g. EmpNames
  5. Leave the Scope as Workbook
  6. Apa itu Data Validation di Excel?

  7. Click in the Refers to box (On the worksheet, the cell that is currently listed in the Refers to box will be highlighted)
  8. To select all of the names in the list, point to the top of the heading cell (B1), and when a black arrow appears, click, to select all the names, without the heading cell. (Be sure to click when the arrow is in cell B1, not in the Column B heading button)
  9. Apa itu Data Validation di Excel?

  10. The table name and column name will appear in the Refers to box: =Table1[Employees]
  11. Click OK, to complete the name.
  12. Apa itu Data Validation di Excel?

Use the Name Box

This is a quick way to name a range of cells.

  1. Click at the top of the heading cell, to select all the cells in the list (the heading will not be selected).

    Apa itu Data Validation di Excel?

  2. Click in the Name box, to the left of the formula bar
  3. Type a one-word name for the selected cell range, e.g. EmpNames, and then press the Enter key, to complete the name.
  • NOTE: After you press Enter, the name will disappear, and the Table name will appear in the name box.

    Apa itu Data Validation di Excel?

3. Create the Drop Down List

Now that you have created a named range, you can use that to create a drop down list in one or more cells

  • Select the cells in which you want the drop down list

Apa itu Data Validation di Excel?

  • On the Ribbon's Data tab, in the Data Tools group, click the Data Validation button.

Apa itu Data Validation di Excel?

  • When the Data Validation dialog box open, go to the Settings tab
  • First, click in the Allow box
  • Then, from the Allow drop down list, select List
    • Tip: Use your mouse to select an item in the list, or use the Down arrow on your keyboard

Apa itu Data Validation di Excel?

  • Click in the Source box, and type an equal sign, and the list name, for example:
    • =EmpNames
  • OR, to use a keyboard shortcut, press the F3 key, to see a list of names
  • Then, click on a name, to select it, and click OK

Apa itu Data Validation di Excel?

  • Optional: Go to the Input Message tab, and create a custom message with tips for entering a valid item
  • Optional: Go to the Error Alert tab, and create a custom error message, to help people correct any invalid entries
  • Click OK to close the Data Validation dialog box.
  • Click on one of the cells, and click the drop down arrow

Apa itu Data Validation di Excel?

  • Click on an item in the drop down list, to enter it into the cell.

Apa itu Data Validation di Excel?

List on Different Sheet

If you prefer not to create a named Excel table, you can create a named range, and use that as the source for a drop down list. The drop down lists can be on the same sheet as the source list, or on a different sheet.

Watch this video to see the steps, and see the written instructions here: List from Another Workbook

Use a Delimited List

Instead of referring to a list of items on the worksheet, you can type the list in the Source box, separated by commas. For example:

Yes,No,Maybe

Notes:

  1. This method of Data Validation is case sensitive -- if a user types YES, an error alert will be displayed.
  2. Space characters can be typed before or after the valid items, and no error message is displayed, e.g. " Yes   " would be allowed. (Thanks to Peter for this tip.)

Apa itu Data Validation di Excel?

Allow Entries Not in Drop Down List

When you add data validation to a cell, the Error Alert feature is automatically turned on. It stops the users from entering invalid data in the cell.

In some worksheets, where there is a drop-down list of valid items, you might want to allow other items to be entered too. For example:

  • In a worksheet order form, show a short drop-down list of the top product names, so it's easy to enter those items
  • But, allow people to type new product names in the cell, when needed

Turn Off Error Alert

The quickest way to allow users to type items that are not in the list, is to change the data validation error alert setting. To change that setting, follow these steps:

  1. Select the worksheet cells where you want to turn off Error Alert
  2. On the Ribbon, click the Data tab, and click Data Validation
  3. In the Data Validation Settings window, click on the Error Alert tab
  4. Remove the check mark from Show error alert after invalid data is entered

Apa itu Data Validation di Excel?

Other Data Validation Error Alert Options

There are other Error Alert options too, if you don't want to turn that setting off completely. For details on setting up the error alerts, and other data validation messages, go to the Show Data Validation Messages page.

For example, you could show a warning message, and ask if they want to continue with the entry.

Apa itu Data Validation di Excel?

Or, just show an information message, that reminds them the item was not in the drop-down list of valid entries.

Apa itu Data Validation di Excel?

Get the Sample File

You can download the sample Drop Down Lists file here: Drop Down List Workbook. The zipped file is in xlsx format, and does not contain any macros.

Apa itu Data Validation di Excel?

More Tutorials

Create Dependent Drop Down Lists

Data Validation Index Page

Change Product Name to Code

Dependent Drop Down Lists Video

Hide Used Items in Drop Down

List from Another Workbook

Data Validation Criteria Examples

Data Validation Date Rules

Data Validation Tips

Data Validation With Combo Box

Apa itu Data Validation Excel?

Data validation pada Excel adalah fitur untuk melakukan validasi data yaitu memastikan data yang dimasukkan pada suatu sel atau range telah memenuhi kriteria tertentu. Data validation secara umum berguna untuk mengurangi tingkat kesalahan input data dalam jumlah besar.

Data Validation di Excel dimana?

Pilih satu atau beberapa sel untuk divalidasi. Pada tab Data, di grup Alat Data, klik Validasi Data. Di tab Pengaturan, dalam kotak Perbolehkan, pilih Daftar. Di kotak Sumber, ketikkan nilai daftar Anda, yang dipisahkan dengan koma.

Bagaimana cara melakukan validasi data?

Cara Menggunakan Data Validation Excel.
Pilih(seleksi) Sel/Range yang akan Anda atur data validation-nya..
Pilih Menu Data Validation Pada Tab Data -- Group Data Tools . ... .
Setelah muncul kotak opsi Data Validation , setting pengaturan validasi data atau pembatasan isi sel yang diinginkan..

Apa yang dimaksud dengan validasi data dalam Microsoft?

Aturan validasi adalah satu cara untuk membatasi input dalam bidang tabel atau kontrol (seperti kotak teks) pada formulir. Teks validasi memungkinkan Anda menyediakan pesan untuk membantu pengguna yang memasukkan data yang tidak valid.