How to Validate Yes/No and Number Columns in SharePoint
Question details
The user needs to enforce a validation rule in a SharePoint list where a Number column is required if a specific Yes/No column is marked as Yes, but can remain blank if marked as No.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Configuring conditional data entry rules for a SharePoint list to prevent incomplete submissions.
- Observed behavior
- Because the validation condition depends on the values of two distinct columns, standard column validation cannot be used; it must be configured at the list level.
Ensure you have 'Manage Lists' permissions or are a Site Owner for the SharePoint site where you plan to apply the validation rule.
Configure List Validation Settings in SharePoint
Use SharePoint's List Validation settings to evaluate multiple columns simultaneously using a custom logical formula.
Column-level validation in SharePoint only allows you to evaluate the current column. To create a dependency between a Yes/No column and a Number column, you must use List-level validation, which supports formulas referencing multiple fields.
Navigate to your SharePoint list, click on the Gear icon (Settings) in the top right corner of the screen, and select 'List settings'.
Under the General Settings section, click on 'Validation settings'.
In the Formula text box, enter the following formula: =OR(NOT([Yes/No]),AND([Yes/No],NOT(ISBLANK([Number])))). Replace [Yes/No] and [Number] with the exact names of your list columns.
In the User Message box, type a clear instruction such as 'You must enter a number if the Yes/No option is set to Yes, or clear the Yes option.' This helps users understand what to fix.
Click the Save button at the bottom of the page to apply your new list validation rule.

Use WPS Office for Your Everyday Document Needs
While SharePoint effectively manages your online data lists, WPS Office is the perfect lightweight, free alternative for handling your daily documents, spreadsheets, and presentations. Enjoy full compatibility with Microsoft Office formats and a familiar user interface that makes transitioning seamless.
- 1. Download WPS Office: Visit the official WPS website and download the free installer tailored for your operating system.
- 2. Install the Software: Run the downloaded installer and follow the simple on-screen instructions to set up WPS Office on your computer.
- 3. Open and Edit Your Files: Launch WPS Office to easily open, edit, and save your existing Microsoft Office documents without formatting loss.

Frequently Asked Questions
Why can't I use standard Column Validation for this rule?
Column Validation in SharePoint only allows you to reference the data within that specific column. Since your rule requires checking the status of a Yes/No column to validate a separate Number column, you must use List Validation, which supports cross-column formulas.
What happens if a user leaves the Number column blank when Yes is selected?
If the validation rule is properly configured, SharePoint will prevent the item from being saved. It will immediately display the custom user error message you provided in the Validation Settings, prompting the user to correct the input.
Do I need to include square brackets in the validation formula?
Yes, you must wrap your column names in square brackets (e.g., [Column Name]) within the formula. This is especially important if your column names contain spaces or special characters, so SharePoint can correctly identify the fields.
Can I add more conditions to this list validation formula?
Yes. You can expand the formula using standard logical functions such as IF, AND, and OR to include additional columns and more complex validation criteria as needed for your list.




