
- MS Excel Basics
- Excel - Home
- Excel - Getting Started
- Excel - Explore Window
- Excel - Backstage
- Excel - Entering Values
- Excel - Move Around
- Excel - Save Workbook
- Excel - Create Worksheet
- Excel - Copy Worksheet
- Excel - Hiding Worksheet
- Excel - Delete Worksheet
- Excel - Close Workbook
- Excel - Open Workbook
- Excel - Context Help
- Editing Worksheet
- Excel - Insert Data
- Excel - Select Data
- Excel - Delete Data
- Excel - Move Data
- Excel - Rows & Columns
- Excel - Copy & Paste
- Excel - Find & Replace
- Excel - Spell Check
- Excel - Zoom In-Out
- Excel - Special Symbols
- Excel - Insert Comments
- Excel - Add Text Box
- Excel - Undo Changes
- Formatting Cells
- Excel - Setting Cell Type
- Excel - Setting Fonts
- Excel - Text Decoration
- Excel - Rotate Cells
- Excel - Setting Colors
- Excel - Text Alignments
- Excel - Merge & Wrap
- Excel - Borders and Shades
- Excel - Apply Formatting
- Formatting Worksheets
- Excel - Sheet Options
- Excel - Adjust Margins
- Excel - Page Orientation
- Excel - Header and Footer
- Excel - Insert Page Breaks
- Excel - Set Background
- Excel - Freeze Panes
- Excel - Conditional Format
- Working with Formula
- Excel - Creating Formulas
- Excel - Copying Formulas
- Excel - Formula Reference
- Excel - Using Functions
- Excel - Builtin Functions
- Advanced Operations
- Excel - Data Filtering
- Excel - Data Sorting
- Excel - Using Ranges
- Excel - Data Validation
- Excel - Using Styles
- Excel - Using Themes
- Excel - Using Templates
- Excel - Using Macros
- Excel - Adding Graphics
- Excel - Cross Referencing
- Excel - Printing Worksheets
- Excel - Email Workbooks
- Excel- Translate Worksheet
- Excel - Workbook Security
- Excel - Data Tables
- Excel - Pivot Tables
- Excel - Simple Charts
- Excel - Pivot Charts
- Excel - Keyboard Shortcuts
- MS Excel Resources
- Excel - Quick Guide
- Excel - Useful Resources
- Excel - Discussion
How to Allow Only Yes or No Entry in Excel?
Sometimes we have a column where we want the user to enter only yes or no for the whole column. The people are entering things like "maybe" or any other words in the "Yes or No" column, and if you want to restrict the user to entering Yes or No, then we can use this simple trick in order to generate an error message if any other words are entered other than Yes or No. In this tutorial, we will learn how we can allow only yes or no entries in Excel.
Allowing Only Yes or No Entry in Excel
Here we will first add the data validation and then edit the error message. Let us look at a simple example to see how we can only allow yes or no entries in Excel.
Step 1
Consider the following Excel sheet with data similar to the image below.

For now, keep the values in the second column empty and enter those values after completing the procedure.
We use the concept of data validation to achieve our goal in this process.
Now click on the data on the quick access tool bar and select data validation. A pop-up will be opened as shown in the below figure.


Step 2
Select allow as custom as in the formula box, and then enter the formula as
=(OR(B2="YES",B2="NO")) and click on OK to complete our process as shown in the below image.

Step 3
We can also customise the error message that will be shown when we don’t enter the correct input.
To do so, in the same pop-up, click on the error alert, enter the title as yes or no, and the error message as "Please enter only yes or no in the field," then click on "OK," as shown in the image below.

Step 4
If we try to enter any value other than yes or no in the second column, an error message will be displayed, as shown in the below screenshot.

Conclusion
In this tutorial, we used a simple example to demonstrate how we can allow only yes or no entries in Excel to highlight a particular set of data.
- Related Articles
- How to Generate Random Yes or No in Excel?
- How to Apply Data Validation to Allow Only Numbers in Excel?
- How to Allow Only Date Format in Specific Cells in Excel?
- How to Calculate the Percentage of Yes and No from a List in Excel?
- MySQL IF() to display custom YES or NO messages
- How to allow no breaks in the enclosed text in HTML?
- How to Auto-Fill Date or Only Weekdays Sequence in Excel?
- How to Allow Certain Users to Edit Cells Range in Excel?
- How to Allow to Edit Objects in a Protected Worksheet in Excel?
- How to create a dialog with “yes” and “no” options in JavaScript?
- How to make JOptionPane to handle Yes, No and Closed buttons in Java?
- Allow only access to camera device in HTML5
- How to Only Allow Numbers in a Text Box using jQuery?
- How to add header or footer to first page only in an Excel worksheet?
- Inline conditions in Lua (a == b ? “yes” : “no”)
