Office Settings & Configuration

Set Up Conditional Required Fields in Excel for the Web

Steven ParkerSteven Parker Nov 18, 2026 868 views

Question details

Set up rules for required fields in Excel for the web based on the value in column C.

Set Up Conditional Required Fields in Excel for the Web
Product
Microsoft Excel for the web
Device & OS
not provided
Scenario
Columns A and B should always be filled. Column D is required when C is USA, while columns E and F are required when C is USA.washington.
Observed behavior
The user wants to identify or reject missing values according to these conditions.
Before you start

Open the workbook in Excel for the web and check that row 2 is the first data row. Confirm that column C uses the exact values USA and USA.washington, with no extra spaces.

Solution 1Recommended

Apply custom validation rules to the required columns

Use separate custom rules to check entries in columns A, B, D, E, and F.

The formulas below assume data starts in row 2 and ends in row 1000. Adjust the ranges and row numbers to match your sheet.

Data validation does not reliably enforce required fields on cells that are already blank, cleared, pasted over, or made required by a later change in column C. Use the row check in the next solution to find missing values.

1
Validate column A

Select A2:A1000, open Data > Data Validation, choose a custom rule, and enter =A2<>"".

2
Validate column B

Select B2:B1000 and add a custom data-validation rule with =B2<>"".

3
Make D conditional on USA

Select D2:D1000 and add the custom rule =OR($C2<>"USA",D2<>"").

4
Make E and F conditional on USA.washington

Select E2:E1000 and add =OR($C2<>"USA.washington",E2<>""). Then select F2:F1000 and add =OR($C2<>"USA.washington",F2<>"").

5
Configure the alert

In each Data Validation dialog, clear Ignore blank and enable an error alert if those options are available. Choose the Stop alert style when offered, then save the rule.

Apply custom validation rules to the required columns
Validation is not a submission lock: A Stop alert can reject an invalid entry when validation is triggered, but it cannot guarantee that every required cell is filled before the workbook is saved.
WPS Spreadsheet

Check Conditional Required Fields in WPS Spreadsheet

Use custom data validation in WPS Spreadsheet to check entries, then add a helper formula to identify rows with missing conditional fields.

  1. 1. Open the workbook: Open WPS Spreadsheet, select Open, and choose your Excel workbook.
  2. 2. Add the required-field rules: Select A2:A1000, open Data > Data Validation, choose Custom, and enter =A2<>"". Repeat for B2:B1000 with =B2<>"".
  3. 3. Add the conditional rules: Use Data > Data Validation > Custom for D2:D1000 with =OR($C2<>"USA",D2<>""). Apply =OR($C2<>"USA.washington",E2<>"") to E2:E1000 and =OR($C2<>"USA.washington",F2<>"") to F2:F1000.
  4. 4. Flag incomplete rows: In G2, enter =IF(OR(A2="",B2="",AND(C2="USA",D2=""),AND(C2="USA.washington",OR(E2="",F2=""))),"Missing required field","OK") and fill it down alongside your data.
Apply conditional validation rules to spreadsheet cellsFlag missing required fields with a helper formulaOpen and save Microsoft Excel XLSX and XLS filesWork with a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Why can a required cell still be blank after I add validation?

Data validation checks entries when triggered; it does not necessarily check cells that were already blank or became required after column C changed. Add the helper formula in column G to flag those rows.

Does USA.washington also make column D required?

No. The rule for D checks whether C equals USA exactly. The separate rules for E and F check for USA.washington.

How do I change the rules if my data starts on row 5?

Select ranges starting on row 5 and change each formula's row reference to 5. For example, apply =OR($C5<>"USA",D5<>"") to the column D range starting at D5.

Can these rules prevent someone from saving an incomplete workbook?

No. Data validation and the helper formula can reject some invalid entries or flag missing values, but neither reliably blocks saving an incomplete workbook.