How to Make an Excel Cell Required Using Data Validation
Question details
The user wants to enforce mandatory data entry in specific spreadsheet cells by rejecting blank submissions.

- Product
- Microsoft Excel / WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- Creating forms or data entry templates where certain fields must be filled out before moving on, requiring a basic mandatory-field check.
- Observed behavior
- Users need to configure Data Validation to restrict empty inputs and display a Stop error alert when a required cell is left blank.
Identify the specific cells or ranges that need to be mandatory in your worksheet. Keep in mind that Data Validation is a basic check and can sometimes be bypassed if a user pastes data directly into the cell.
Use a Custom Formula to Reject Blank Entries
Set up a Data Validation rule using the LEN function to ensure the cell contains text or numbers.
This method uses the LEN function to count the number of characters in a cell. By setting the requirement to greater than zero, the spreadsheet will reject the entry if the user tries to clear the cell or leave it blank during data entry.
Highlight the specific cell or range of cells (for example, A1) that you want to make required.
Navigate to the 'Data' tab on the ribbon menu and click on 'Data Validation'.
In the Data Validation dialog box, go to the 'Settings' tab. Under the 'Allow' drop-down menu, choose 'Custom'. In the Formula box, enter =LEN(A1)>0 (ensure you replace A1 with the first cell in your selected range).
Switch to the 'Error Alert' tab. Ensure the 'Show error alert after invalid data is entered' box is checked. Choose 'Stop' from the Style drop-down menu, enter a descriptive error message like 'This field is required', and click OK.
Easily Enforce Required Cells with WPS Spreadsheet
WPS Spreadsheet offers a highly intuitive interface for setting up Data Validation, allowing you to create required fields, custom formulas, and error alerts effortlessly while maintaining full compatibility with your existing Excel files.
- 1. Select the Target Cells: Open your workbook in WPS Spreadsheet and highlight the cells you want to make mandatory.
- 2. Open Data Validation: Navigate to the 'Data' tab on the top ribbon and click on the 'Validation' icon.
- 3. Set Up Custom Formula: Under the 'Settings' tab, choose 'Custom' from the Allow dropdown and enter =LEN(A1)>0 (replace A1 with your first selected cell).
- 4. Configure Error Alert: Switch to the 'Error Alert' tab, select 'Stop' as the style, type an error message, and click 'OK'.

Frequently Asked Questions
Can Data Validation prevent a cell from being left blank if it's never edited?
No, Data Validation only triggers when a user actively edits or interacts with a cell. If they open the document and never click or type in the required cell, no error message will appear when they save or close the file.
Why doesn't the 'Ignore blank' checkbox make the cell required?
The 'Ignore blank' checkbox allows users to leave the cell empty without triggering an error if the cell is cleared. While unchecking it is part of making a cell strictly evaluated, you still need a custom formula like =LEN()>0 to actively reject blank inputs during data entry.
How do I stop users from pasting data and overwriting the validation rule?
Data Validation alone cannot stop pasting behavior in Excel or WPS Spreadsheet. To strictly enforce rules and prevent pasting over validation cells, you would need to use VBA macros to disable pasting or protect the worksheet cells.




