Conditional validation in Excel means making one cell's data-validation rules depend on what another cell contains. Excel does not have a dedicated "conditional validation" switch, but you get the same result by building the allowed list or rule with a formula that references the controlling cell, then applying it through Data Validation. A common example: a status column limited to Completed or Not started, and a completion-date column that only accepts a date when Status says Completed. Set it up with the Custom rule option and a formula, or with a formula-driven list for dropdowns.
What You'll Need
- Excel for Microsoft 365, Excel 2021/2019, or Excel for Mac - the Data Validation dialog is in all of them, though wording of some options differs slightly by version and region.
- A worksheet laid out so the controlling cell is clearly identifiable (same row, ideally).
- Your source list of allowed values, either inline in the rule or typed into a range of cells.
- For dropdowns, a source range on the same sheet, or a defined name if the list lives on another sheet.
Step-by-Step
- Decide the condition and write it down. Pick the controlling cell (say B2, the status) and the dependent cell (C2, the date). State the rule in plain words: "C2 may only be filled if B2 equals Completed." Vague rules are the main reason conditional validation goes wrong later.
- Apply to the first row only. Select the single dependent cell, C2. Build and test the rule on one row before copying it, so a mistake does not spread down the column.
- Open the dialog. Go to the Data tab and click Data Validation (in the Data Tools group). The dialog has Settings, Input Message and Error Alert tabs. If Excel says the cell already has validation, click Yes to clear it and start fresh.
- Choose Custom for a date, number or free-text rule. In the Allow list, select Custom. The Formula box appears. This is where conditional logic lives.
- Write the formula. For a cell that must be blank unless the status is Completed, use a formula such as
=OR($B2="Completed", C2=""). Translation: the rule passes if B2 says Completed, or the cell is left empty. For a date that must also be a real date, use=OR($B2="Completed", AND(C2="",ISNUMBER(C2))), or simply=IF($B2="Completed",ISNUMBER(C2),C2=""). Keep the formula short and test it in a spare cell first - Custom rules return TRUE to allow and FALSE to block. - Mind the dollar signs. Mixed references matter.
$B2locks the column so every row still looks at its own status cell;B$2would point every row at row 2. Get this wrong and the rule works only on the first row. - Write a clear error alert. Switch to the Error Alert tab, set Style to Stop so invalid entries are rejected outright (Warning and Information only prompt), give it a short title like "Date not allowed" and a message such as "Enter a date only after Status is Completed, or leave this cell empty." A vague message causes more support requests than a strict rule.
- Test all three cases. Type a valid value with the condition met, an invalid value with it unmet, and leave the cell blank. Also try clearing the status after a date exists - Custom rules do not retroactively clear old entries, so decide whether existing values are acceptable.
- Copy the rule down. With C2 selected, copy it, select the rest of the range, and use Paste Special > Validation. That pastes only the rule, not the formatting. Alternatively, select the whole range first and apply the rule once with relative references - this is cleaner and avoids doubled rules.
- Build a conditional dropdown (second technique). If the goal is a list that changes with another cell, put each list in its own range (for example Fruits and Vegetables), name each range in the Name Box, then select the dependent cell, open Data Validation, set Allow to List, and in Source type
=INDIRECT(B2)where B2 holds the category name. Category names must match the defined names exactly, with no spaces. - Test the dependent list. Change the category and confirm the dropdown swaps. If it shows only the first item or errors out, the defined name is misspelled or contains a space - use an underscore and update the cell to match.
- Protect the sheet if needed. Validation is easily pasted over. If the rules must hold, review the sheet and protect it, allowing users to select unlocked cells. Note that protection is a guard against accidents, not a security measure.
Common Mistakes
- Mixing absolute and relative references.
$B$2in a range-wide rule makes every row read the same cell. Use$B2when the rule is applied down a column. - Forgetting blank handling. A Custom formula that demands a value blocks empty cells forever. Include an OR branch that accepts blanks when the row is incomplete.
- Expecting pasted data to be blocked. Pasting bypasses most data validation. Users who paste from elsewhere will overwrite rules silently.
- Expecting old data to be cleaned up. Validation only checks new entries typed after the rule exists.
- List source with spaces in the name. INDIRECT breaks if the defined name has spaces; use underscores instead.
- Circular references. A rule on C2 that points at C2 stops working. Validation formulas should reference other cells, not themselves.
- Note the UI language. Excel expects the argument separator appropriate to your regional settings, so a formula that needs commas may need semicolons elsewhere. If Excel rejects a working formula, check separators first.
Tips
- Build the logic in a helper column first with a plain formula, confirm the TRUE/FALSE results look right, then paste the same expression into the Custom box.
- Use an Input Message on the dependent cell to explain the rule before anyone types anything - far more effective than an error alert after the fact.
- Keep list sources in a clean single-column range with no blank cells; blanks appear as odd gaps in dropdowns.
- For dependent lists with many categories, use tables and structured references where you are comfortable with them, but a named range is simpler to debug.
- Select the whole target range before applying the rule so there is one rule, not one per row - easier to edit later.
Troubleshooting
- The rule does not work on other rows. Your references are probably locked to one cell. Reopen Data Validation and change
$B$2to$B2. - Valid values are rejected. Test the formula in a cell. Text that looks identical may contain a trailing space or differ in case rules; compare with EXACT to check. Also confirm the controlling cell does not have a stray space after "Completed".
- Invalid values are accepted. Check the Error Alert style - if it is Information or Warning, typed entries can still be confirmed. Set it to Stop.
- The dropdown is empty or shows one item. The source range is wrong or the defined name points to a single cell. Recheck the Name Box and the range address.
- Data Validation is greyed out. The sheet may be protected or shared in a way that blocks editing. Unprotect it first (Review > Unprotect Sheet).
- Rules vanished after copying. Paste Special > All should carry validation; a normal paste from outside Excel does not.
- Still stuck: clear validation and rebuild on one cell, then copy; and compare with a blank workbook to rule out existing rules clashing. Clearing validation removes the rules only, not the data, but you will need to re-enter them.
Frequently Asked Questions
Is there a built-in "conditional validation" feature?
No. You use Custom rules or formula-driven lists in Data Validation to achieve the same outcome.
Can validation depend on more than one cell?
Yes. Combine conditions with AND or OR inside the Custom formula, referencing each controlling cell.
Why does pasting bypass my rules?
Excel's validation does not police pasted content. Protect the sheet or paste as values through a controlled process if this matters.
Can I validate a cell on a different sheet?
Custom formulas cannot reference other sheets directly in older versions; use a named range or an INDIRECT-based list instead.
Does validation delete existing bad entries?
No. It only checks new typing. Run a filter or conditional formatting check to find old violations.