Data Validator

 

 

In this tutorial, we are going to cover the following topics.

Data validation

Data validation is very important in the sense that it helps us avoid mistakes that can be avoided. Let’s assume you are recording student exam marks and you know the minimum is 0 and the maximum is 100. You can take advantage of validation features to ensure that only values between 0 and 100 are entered.
Add a new sheet to your workbook by clicking on the plus button at the bottom of the worksheet.

Add a column for S/N, Name and Score. Your sheet should look as follows:

S/N Name Score
1 Jane
2 James
3 Jones
4 Jonathan
5 John
  • Click on the DATA tab
  • Select the cells C2 to C6 (The cells that will be used to record the scores)

 Excel Data Validation

  • Click on the Data validation drop-down list.
  • Click on Data validation.

 Excel Data Validation

  • You will get the following dialogue window

 Excel Data Validation

  • Click on the Error Alert tab
  • Enter the alert title and message as shown in the diagram below.

 Excel Data Validation

  • Click on the OK button
  • Try to enter a score greater than 200. You will get the following error message

 Excel Data Validation

 

Data filters

Data filters allow us to get data that matches our desired criteria. Let’s say we want to show the results of all the students whose names start with “ja” or get scores that are less than, greater than or equal to a certain value, we can use filters to get such data. Select the name and scores columns as shown below

  • Click on the DATA tab on the ribbon
  • Click on Sort & Filter drop-down list as shown in the image below

 Excel Data Validation

  • Click on the Name Filter
  • Select text filters
  • Select begins with
  • You will get the following window.

 Excel Data Validation

  • Enter “ja” and click on the “OK” button
  • You should be able to see only the results for Jane and James.

 

Group and Ungroup

Groups allow us to view easily and hide unnecessary details from either columns or rows. In addition to that, we can also use groups to analyse data that belong to a common category. Let’s illustrate this with an example. We will use the student scores example above.

 Excel Data Validation

  • Right-click on the score and select Insert column. Name the name column gender.
  • Change James to Juanita. Put female for Janet and Juanita. Put male for the rest of the students. Your sheet should look as follows.

 

 Excel Data Validation

 We will now group the females and display their average scores and do the same for the males.

  • Click on the DATA tab on the ribbon
  • Select all the columns and rows with data
  • Click on Group drop-down button as shown in the image below

 Excel Data Validation

  You will get the following window:

 Excel Data Validation

  • Make sure Rows options are selected
  • Click on the OK button
  • You will get the following preview

 Excel Data Validation

  • We will now calculate the average scores for females and males
  • Select the whole data as shown below

 Excel Data Validation

 Click on the Subtotal drop down button under the DATA tab:

Excel Data Validation

 You will get the following window:

Excel Data Validation

  • Set “At each change” to gender
  • Set “Use the function” to average
  • Select “Add subtotal” to Score
  • Click on the “OK” button

 

 Excel Data Validation

 

Summary

In this article, we have learnt how to perform basic arithmetic operations using Excel, format the data, apply validation rules, filter data and how take advantage of groups to further analyse data and improve presentation.

 

 Thank you for the assistance from Guru 99

 

 

 

 

 

 

 

 

 

Back to blog