Set Up Conditional Required Fields in Excel for the Web
Question details
Set up rules for required fields in Excel for the web based on the value in column C.

- 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.
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.
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.
Select A2:A1000, open Data > Data Validation, choose a custom rule, and enter =A2<>"".
Select B2:B1000 and add a custom data-validation rule with =B2<>"".
Select D2:D1000 and add the custom rule =OR($C2<>"USA",D2<>"").
Select E2:E1000 and add =OR($C2<>"USA.washington",E2<>""). Then select F2:F1000 and add =OR($C2<>"USA.washington",F2<>"").
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.

Add a row check for missing required fields
Use a helper column to flag incomplete rows, including rows whose conditions changed after data entry.
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. Open the workbook: Open WPS Spreadsheet, select Open, and choose your Excel workbook.
- 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. 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. 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.

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.




