The Wayback Machine - https://web.archive.org/web/20240726070011/https://www.geeksforgeeks.org/how-to-create-custom-input-and-error-messages-in-excel/
Open In App

How to Create Custom Input and Error Messages in Excel?

Last Updated : 22 Mar, 2022
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report

In Excel, you must have seen an error message before filling up any application form, admission form, and many other forms. It asks us specific things to enter like only 7 digit roll numbers or pops-up messages like no duplicate value allowed. All of these restrictions while entering data are known as error messages or custom input because it specifies the type of data to be entered. And it is used to eliminate unwanted values from the data and makes the record easy to use. In this article, we will see how to create input and error messages. 

Creating an Error Message

Suppose we have usernames and we want to enter their contact numbers of 10 digits only. Now we create an error message which will show an error message if a user tries to enter more than 10 digits in the PhoneNumber column.

 

Step 1: Click on the cell where you want to show the error input message. Then go to Data Tab>Data Tools Group>Data Validation i.e click on the Data tab and go to Data Tools and click Data Validation. Data Validation is a feature in Excel that is used by users to control the input cell values be it text, date, or numbers. You have control over the entered data.

Select-Data-Validation

Step 2: After clicking on Data Validation a drop-down(as shown below) will appear. Click on Data Validation from the drop-down.

Click-on-Data-Validation

 

Step 3: A window will open(as shown below). In the Allow column, select Text length. In Data, select equal to and in Length, select 10(because you want only 10 digit contact numbers). If you want to enter a smaller or larger number than 10, then write the required number in the last column. This step is necessary to perform to make sure the text entered in the required cell is equal to 10-digits. 

Click-on-ok-button

 

Step 4: Click on Error Alert, check the box that says Show error alert after invalid data is entered (This check box will ensure that the error message will pop-up only when the user entered an invalid value i.e value greater or smaller than a 10-digit), select Stop in Style option(this is used to restrict the user from entering any value other than 10-digit number) then enter the Title and Error message of your own choice and press OK. The title and the error message will be visible to the user only when he/she enters a larger or smaller digit other than 10-digit.

Click-on-Error-Alert

 

The error message is applied to the cell. To apply the same to all the required cells, simply hold the ‘+’ sign and drag it to the bottom of the required cells.

Final-output

 

Note:  The Invalid Entry dialogue box is the error message popped up when numbers greater than 10-digits are entered in the Phone Number column. You can use both Input Message and Error Alert at the same time. The screenshot above shows both an Error Message and an Input Message.

Creating a Custom Input Message

Step 1: Click on the cell where you want to show the error input message. Then go to Data Tab>Data Tools Group>Data Validation i.e click on the Data tab and go to Data Tools and click Data Validation. Data Validation is a feature in Excel that is used by users to control the input cell values be it text, date, or numbers. You have control over the entered data.

Select-Data-Validation

 

Step 2: After clicking on Data Validation a drop-down(as shown below) will appear. Click on Data Validation from the drop-down.

Click-on-Data-Validation

 

Step 3: A window will open(as shown below). In the Allow column, select Text length. In Data, select equal to and in Length, select 10(because you want only 10 digit contact numbers). If you want to enter a smaller or larger number than 10, then write the required number in the last column. This step is necessary to perform to make sure the text entered in the required cell is equal to 10-digits.

Click-on-ok-button

 

Step 4: After settings click on Input Message, check on the first option, and then write the message that you want to show the user. Then click OK. The title and the input message will be visible to the user when the user selects the required cell.

Click-on-Input-Message

 

You Input Message will be seen as you hover over the cell.

Input-message-output

 

The output here shows the input message that we have written. The input message will be seen as soon as the user selects the required cell.


Similar Reads

How to Create Custom Charts in Excel?
The instructional exercise makes sense of the Excel outlines fundamentals and gives the point-by-point direction on the most proficient method to make a chart in Excel. Diagrams assist you with imagining your information in a manner that makes a most extreme effect on your crowd. Figure out how to make a graph and add a trendline. Create a chartSel
2 min read
How to Create a Custom Date Format in Excel?
Date formatting is very important when you prepare any set of data, then there are different types of formatting used for different categories, which are different from our normal formatting which is dd/mm/yyyy. When you enter any date in MS-Excel then excel considers it as the default format of date as your computer has, but you can change their f
3 min read
How to Create an Input Box With Multiple Inputs in Excel Using VBA?
The Input Box is a dialogue box that helps users to take a value and do later computations according to the entered value. The input box is similar to the message box, but the message box is used to display the data while the input box is used to enter the data. By default, a message box displays only the Ok button in its conversation box, whereas
9 min read
Hide Error Values and Indicators in Cells in Excel
While working with formulas in spreadsheets, we might get error values. These error values are often shown in the cells as error indicators. Sometimes, they are helpful in resolving errors but other times when errors need not be corrected, these error values just make the spreadsheet look cluttered. In such a situation, it is better to hide these e
6 min read
Use Custom Data Validation Function To Limit Number of Digits In Excel
There might arise a situation while working on Excel where you want the users to type in 10-digits(say) numbers only in a cell. In these types of scenarios, we can make use of the Custom Data validation Function to limit the number of digits in Excel. In this article, we will discuss the same. Sample Data: Customer Sales Table Approach: First, we c
1 min read
Custom Lists in Excel
Custom lists are a tool from where we can sort data either by days of the week or months of the year. We can create our own custom lists In this article we will look at how we can do Sorting using Custom Lists in Excel. Sorting data using built-in custom lists: To do so follow the steps below: Step 1: Start by formatting our data. Step 2: Highlight
2 min read
Custom Format to Show Units Without Changing Number to Text in Excel
Microsoft Excel is a great software that is used by individuals to store data in the form of spreadsheets in a formatted manner. Microsoft Excel allows us to store a variety of data such as characters, text, numbers, decimals, date, time, etc. Since Excel is a smart tool, it automatically identifies the data type of the records and places them acco
3 min read
Custom Excel Number Format
MS Excel is a very important tool for businesses as well as for individuals with very useful features and tools. It is a market leader in spreadsheet editing and managing software. MS Excel contains many inbuilt number formats that can be used as per the needs of the user, however, sometimes users may need specific custom number formats that are no
2 min read
How to Calculate Root Mean Square Error in Excel?
In simple terms, Root mean square error means how much far apart are the observed values and predicted values on average. The formula for calculating the root-mean-square error is as follows : Where, n: number of samplesf: Forecasto: observed valuesCalculating Root Mean Square Error in Excel : Follow the below steps to calculate the root means squa
2 min read
How to Calculate Mean Squared Error in Excel?
Mean Squared Error is defined as the mean of the square of the difference between the actual values and the expected values. Where, O = Observed value,E = Expected Value,n = No. of observations Example: Follow the below steps to evaluate the MSE in Excel: Step 1: Suppose we are given the data in form of expected and observed value as follows: Step
1 min read
three90RightbarBannerImg