Validating in Excel means using the Data Validation feature to restrict what can be typed into a cell and to catch bad entries before they break your formulas, pivot tables or imports. The fastest working set of steps: select the cells you want to control, go to Data > Data Validation, choose an Allow type (Whole number, Decimal, List, Date, Text length or Custom), fill in the limits or the source list, and click OK. Excel then blocks or warns on anything outside the rule. You can also use it to build dropdown lists, and later find existing bad entries with Circle Invalid Data.
Note that menu and dialog wording can differ slightly by Excel version, platform (Windows, Mac, web) and region, so if a label does not match exactly, look for the closest equivalent in the Data tab. The steps below describe the desktop apps; the Excel for the web version has a reduced version of the dialog.
What You'll Need
- Microsoft Excel on Windows or Mac (the desktop app) for the full Data Validation dialog. Excel for the web supports basic validation but with fewer options.
- A worksheet with your data laid out, ideally with a header row so you can label the rule you are about to create.
- For a dropdown list, either a short list of values typed directly into the dialog (separated by commas) or a range of cells on the same sheet that holds the items.
- An optional second sheet or a named range if you want a long dropdown list kept out of the way.
Step-by-Step
- Select the target cells. Click and drag over the cells you want to validate. Select the whole column if you want the rule to apply to entries typed later, but select only the data area if you want to keep headers editable. You can select several non-adjacent ranges by holding Ctrl (Windows) or Command (Mac) while clicking.
- Open the dialog. On the Ribbon, click the Data tab, then Data Validation in the Data Tools group. In some versions this button sits in a dropdown; choose Data Validation from it. The dialog opens on the Settings tab.
- Choose what is allowed. In the Allow dropdown, pick the type that fits your data: Whole number for counts and IDs, Decimal for measurements, List for fixed categories, Date for deadlines, Time for schedules, Text length for codes with a fixed number of characters, or Custom for a formula-driven rule.
- Set the limits. The Data dropdown then offers operators such as between, not between, equal to, greater than and less than. Type your minimum and maximum in the boxes that appear. For example, allow whole numbers between 1 and 100. Leave Ignore blank ticked if empty cells should stay permitted.
- Build a dropdown list (if that is your rule). Set Allow to List. In the Source box, either type values separated by commas (for example Yes,No,Maybe) or click into the box and select a range of cells that contains the items. If the list lives on another sheet, give that range a name first (Formulas > Define Name) and type the name in the Source box, prefixed with an equals sign.
- Customise the error alert. Open the Error Alert tab. Choose Stop to block bad entries outright, Warning to allow them after a confirmation, or Information to show a note but accept the value. Write a short title and message such as "Enter a quantity between 1 and 100". A clear message saves far more time than the default one.
- Add an input message (optional). On the Input Message tab, tick Show input message when cell is selected and type a hint. This appears as a small tooltip when someone clicks the cell, which is useful for shared workbooks.
- Click OK and test it. Type a valid value and an invalid value into the cells. The invalid entry should be rejected or flagged according to the alert style you chose. If nothing happens, recheck that you selected the right cells before opening the dialog.
- Check existing data. Data Validation only applies to new typing. To find values already in the sheet that break a rule, go to the Data tab and choose Circle Invalid Data, which draws red circles around offending cells. Choose Clear Validation Circles when you are done.
- Copy the rule to other cells. Select a validated cell, copy it, select the destination cells, then use Paste Special and choose Validation. This transfers the rule without overwriting the existing contents.
Common Mistakes
- Validating the wrong range. Rules are stored per cell, so a rule applied to A2:A10 does nothing for A11 and below. Apply it to a generous range or a whole column if you expect new rows.
- Typing a list with spaces after commas. In a comma-separated source, spaces become part of the item, so "Yes, No" offers a value with a leading space. Leave spaces out.
- Pointing a Source at another sheet directly. Many Excel versions reject cross-sheet references typed straight into the Source box. Use a defined name instead.
- Expecting validation to be secure. Anyone can copy an unvalidated cell and paste over your rule, or use Paste Special > Validation to remove it. Data Validation guides typing; it does not protect a sheet. Use sheet protection if you need to prevent edits.
- Ignoring pasted data. Pasting from elsewhere usually bypasses validation entirely. Imported or pasted values need to be checked with Circle Invalid Data afterwards.
- Forgetting the error style. Leaving the default Stop style is right most of the time, but on large shared sheets a Warning style with a helpful message is often friendlier.
Tips
- Name your ranges (Formulas > Define Name) so dropdown sources are readable and easy to extend; a named range grows if you insert rows inside it.
- Keep list items in a dedicated table or sheet and use the table's column as the source for a list that updates as items are added.
- Custom rules are powerful: a formula such as checking that a code is unique in its column, or that a date is not in the past, can be built with the Custom option and a relative reference.
- Use validation together with conditional formatting: use Data Validation to stop bad input, and a colour rule to highlight cells that are still empty.
- Document the rule in the header or an adjacent notes column so colleagues know what is expected.
- Before sharing a template, test it with deliberately wrong values to confirm the alert text makes sense to someone who has never seen your sheet.
Troubleshooting
The dropdown arrow does not appear. Confirm Allow is set to List and that the Source box is not empty or pointing at an empty range. Re-select the cells and reopen the dialog to check the rule is stored where you think it is.
Valid values are being rejected. Check whether the cell format conflicts with the rule: a cell formatted as Text will not accept a Whole number rule cleanly. Also check for stray spaces, and remember that Whole number refuses decimals even if they look fine.
The rule vanished after editing. Copying a cell without its validation, or pasting an unvalidated cell over it, removes the rule. Reapply it, or use Paste Special > Validation to restore it.
Circle Invalid Data finds nothing but you know there are bad values. The circled entries must violate an existing rule; confirm the rule still covers those cells. Note that circles may not display on zoomed-out sheets, so zoom in to check.
An imported or pasted file ignores the rules. Pasted data bypasses validation, so clean the data first, then apply rules to the cleaned range.
Frequently Asked Questions
Does Data Validation stop people from pasting bad data?
No. Pasting normally bypasses validation. Only sheet protection can prevent edits, and even then users can paste if cells are unlocked.
Can I use a list from another worksheet?
Yes, but the reliable way is to define a name for that range and enter the name in the Source box. Direct cross-sheet references may be rejected depending on version.
How do I remove validation?
Select the cells, open Data > Data Validation, and click Clear All in the dialog, then OK.
Why does my number get refused as the wrong type?
The cell is probably formatted as Text or contains a hidden space or apostrophe. Reformat the cell as General or Number and retype the value.
Can validation check that a value is unique?
Yes, with a Custom rule using a COUNTIF formula that counts the value across the column and allows it only when the count equals one.
Does validation work in Excel for the web?
Partially. The web app offers a simpler Data Validation dialog with fewer rule types and options than the desktop app, so complex custom formulas may need the desktop version.