SharePoint Document Issues

How to Validate Yes/No and Number Columns in SharePoint

Maira MehtabMaira Mehtab Oct 21, 2026 872 views

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.

How to Set Up Validation for Yes/No and Number Columns in SharePoint
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.
Before you start

Ensure you have 'Manage Lists' permissions or are a Site Owner for the SharePoint site where you plan to apply the validation rule.

Solution 1Recommended

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.

1
Access List Settings

Navigate to your SharePoint list, click on the Gear icon (Settings) in the top right corner of the screen, and select 'List settings'.

2
Open Validation Settings

Under the General Settings section, click on 'Validation settings'.

3
Enter the Validation Formula

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.

4
Provide a User Error Message

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.

5
Save the Validation Rule

Click the Save button at the bottom of the page to apply your new list validation rule.

Configure List Validation Settings in SharePoint
Match Column Names Exactly: Ensure the column names inside the brackets in your formula exactly match your SharePoint list's internal column names, including any spaces.
Free Microsoft Office alternative

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. 1. Download WPS Office: Visit the official WPS website and download the free installer tailored for your operating system.
  2. 2. Install the Software: Run the downloaded installer and follow the simple on-screen instructions to set up WPS Office on your computer.
  3. 3. Open and Edit Your Files: Launch WPS Office to easily open, edit, and save your existing Microsoft Office documents without formatting loss.
Fully compatible with Microsoft Excel (.xlsx), Word (.docx), and PowerPoint (.pptx) formats.Lightweight software that installs quickly and runs smoothly on both new and older devices.Familiar, intuitive interface requiring zero learning curve for Office users.Built-in PDF editing, merging, and format conversion tools.
microsoft office alternative - wps office

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.