Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Apply Data Validation in Excel

· 7 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Data validation lets you control what can be typed into a cell, so a column of dates stays dates and a budget column rejects text. Select the cells you want to control, go to Data > Data Validation, pick an Allow type (Whole number, Decimal, List, Date, Time, Text length or Custom), fill in the limit, and click OK. From then on, Excel blocks entries that break the rule or flags them with a warning.

One thing before you start: validation only applies to new typing. Anything already in the cell is not deleted or corrected, so clean that data first. Menu labels can differ slightly by Excel version, platform and region, but the Data tab is the same place everywhere.

What You'll Need

  • Excel for Windows, Mac, the web, or Excel on tablet or phone (some validation types are limited on mobile, so set rules up on desktop or the web where possible).
  • A sheet with headers so you know which column holds what.
  • A cleaned-up data set, since validation will not change existing entries.
  • Optional: a small list of allowed values somewhere in the workbook, if you are building a dropdown.

Step-by-Step

  1. Select the target cells. Drag over the range, or click the column header to apply a rule to the whole column. If you only need a block, select that block now; you can always change the range later.
  2. Open the validation dialog. Go to the Data tab and click Data Validation in the Data Tools group. The dialog opens on the Settings tab.
  3. Choose what is allowed. In the Allow dropdown pick the type you need: Whole number for counts and quantities, Decimal for money and measurements, List for a fixed set of choices, Date or Time for calendars and schedules, Text length for codes or IDs, or Custom for a formula.
  4. Set the condition. The Operator box offers Between, Not between, Equal to, Greater than, Less than, and so on. For example, Whole number > Between > Minimum 1, Maximum 100. For dates, type a real date such as 1/1/2027, not a piece of text.
  5. Build a dropdown list. With Allow set to List, type values into the Source box separated by commas (Home, Work, Other) with no spaces after commas, or click the range selector and highlight a list of cells. Tick In-cell dropdown so users get the arrow.
  6. Write an input message (optional but useful). Open the Input Message tab, tick Show input message when cell is selected, add a short title and a sentence explaining what to enter. This appears when the cell is clicked, before anyone types.
  7. Configure the error alert. Open the Error Alert tab. Style offers Stop (rejects the entry), Warning (asks whether to continue) and Information (informs but allows). Write a title and message that says what is expected, for example \"Enter a date in this year\".
  8. Confirm and test. Click OK, then click a controlled cell and type something invalid. You should see your message. Type a valid value and it should be accepted quietly.
  9. Copy the rule to other cells. Select a validated cell, press Ctrl+C (Cmd+C on Mac), select the new range, then use Paste Special > Paste Special and choose Validation. This copies the rule without overwriting the existing contents.
  10. Find and clean up existing invalid data. Select the range and go to Data > Data Validation > Circle Invalid Data. Excel rings entries that break the rule. These are only marked, not fixed, so correct or delete them yourself.
  11. Review or remove the rule. Click any validated cell, open Data Validation, and either edit the settings or press Clear All to remove the rule. Clearing a rule does not delete the data.

Common Mistakes

  • Expecting validation to clean old data. It does not. Rows already typed stay as they are, so decide whether to fix, delete or ignore them before you send the file on.
  • Forgetting whitespace. A space before or after a value makes Excel see it as different. A list with \"Home, Work\" (space after the comma) creates a \" Work\" entry that will not match anything.
  • Typing dates as text. \"Jan 5\" may be stored as text depending on your locale. Use the date format your system recognises, or the date rule will reject correct-looking entries.
  • Applying to the wrong range. If you select a cell, then paste values over it from another source, the pasted content usually overwrites the validation. Re-apply it or paste values only into an unvalidated helper area first.
  • Relying on Stop for serious mistakes. Users can paste over validation or, if macros are involved, bypass it. Treat validation as a guide, not as a security control; protect the sheet if the data must stay clean.
  • Missing references. If a dropdown points at a range and you delete those cells, the list breaks. Keep the source list on the same sheet or a clearly named sheet and avoid deleting it.

Tips

  • Use Named Ranges for long dropdown lists and point the Source box at the name instead of a cell range; it is easier to extend later.
  • Combine Data > Data Validation with conditional formatting to highlight cells that are empty or still out of range.
  • Use the Custom option with a formula for rules the preset types cannot handle, such as \"text must start with INV-\" or \"date must be a weekday\".
  • Set the input message on every shared template. People fill in what they understand, and a one-line hint reduces rework more than a harsh error pop-up.
  • If the sheet is a form that others fill in, protect it after applying validation so the rules cannot be accidentally pasted over.

Troubleshooting

No error appears when you type bad data. Check you applied the rule to the cell you are testing, and that Error Alert has Show error alert ticked. Also confirm the cell is not part of a table with a conflicting rule or a merged range where only the top-left cell carries the setting.

The dropdown arrow does not show. Confirm Allow is set to List, that In-cell dropdown is ticked, and that the source range is not empty. On Excel for the web, some list sources from other workbooks are not supported, so move the list into the same file.

A valid value is rejected. Likely whitespace, a number stored as text, or a locale date format mismatch. Compare the entry with the rule character by character, or temporarily click Circle Invalid Data to see what Excel thinks is wrong.

Pasting wiped the rule. Paste as plain values into a temporary area, then copy from there, or re-apply the validation with Paste Special > Validation afterwards.

The rule disappeared after saving in another app. Some third-party spreadsheet apps and imports do not fully support Excel validation. Keep editing in Excel, or reapply the rule after the file comes back.

If that did not work, rebuild the rule from scratch on a clean cell and test it there first, then copy it across.

Frequently Asked Questions

Does data validation stop people from pasting invalid data?

No. Pasting bypasses most validation rules. To cut this risk, protect the sheet and leave only the intended input cells editable.

Can I apply validation to several non-adjacent cells?

Yes. Hold Ctrl (Cmd on Mac) and select each cell or range, then open Data Validation once. Excel applies the same rule to all selected cells.

What is the difference between Data Validation and Conditional Formatting?

Validation restricts what can be entered. Conditional formatting only changes how cells look, and it can highlight problems after they exist but cannot block them.

Can I use a list from another sheet in the dropdown?

In desktop Excel, yes, through a named range or a reference such as =Sheet2!$A$1:$A$10. Excel for the web may not accept cross-sheet list sources, so keep the list on the same sheet if you edit there.

Why does my decimal rule reject numbers that look correct?

Check whether the number was entered as text, and whether your regional settings use a comma for decimals. Confirm the Allow type is Decimal rather than Whole number.

Can validation check that a cell is not empty?

Not on its own. Use the Custom option with a formula that tests for a blank, or add a conditional format highlight for empty cells in required fields.