Skip to main content

How to Create a Data Validation Form

 
 - When inputting data into a spreadsheet, often you will find yourself having to type the same data into cells. That's where Data Validation comes in handy. Instead of typing the same thing over and over again, you can turn the cells into drop-down lists. That way, you could just quickly select an item from the list and move on to the next entry.
For example, suppose you had a column heading called "Student Grade". Even though there are only two grades available, Pass and More Work Needed, it can become quite laborious having to type either one or the other. Spelling mistakes will become increasingly more likely the more times you have to enter the grades. Much better to have a drop down list where you could select the grade. And no more spelling mistakes!

Data Validation

We'll now construct a spreadsheet with drop-down lists. The one we're going to construct takes us back to the classroom and our students from previous section.
So start a new spreadsheet, and format it to match the one below:
Create this spreadsheet
Before we can turn the cells in an entire column into drop down lists, we need some data to go in the lists. So starting at cell F2, add the following to your spreadsheet:
Add the data in the F, G and H columns
The data in columns F, G and H will be going into our lists. We can then hide this data so that it's not messing up our spreadsheet. You'll see how to do this later. But we can now turn Columns A, B and C into lists.
To turn the cells in an entire Column into a list, do the following:
  • Highlight the whole of Column A by clicking on the letter A at the top of the column
  • With the whole of Column A highlighted, click on Data from the Excel menu bar
  • From the drop down menu, click Validation
  • The following dialogue box appears:
The Data Validation dialogue box
  • Make sure the Settings tab strip is selected
  • Click the black down arrow just to the right of “Allow: Any Value”
  • A drop down list appears
  • Choose List
  • A Source box appears on the dialogue box
The Source is the data that is going into your list. So you need to select the cells with the students in them. To select the cells with the students in them, do this:
  • Click on the icon to the right of the Source text box:
  • When you click the icon, the dialogue box contracts
  • Click inside cell F2 on your spreadsheet
  • Hold down your left mouse button, and drag to cell F9
  • Then click on the icon again to expand the dialogue box
  • The images below show the highlighting and expanded process in action
Click the icon and highlight F2 to F9
Click the icon and highlight F2 to F9
Click the icon again to expand the dialogue box
Click the icon again to expand the dialogue box
  • If you have done it all correctly, your dialogue box will now look like this one:
So the Validation criteria should be: "Allow List", and the Source should be = $F$2:$F$9.
Click OK when your dialogue box reads the same as the one above. The cells in you entire A column will now be drop down lists. Test it out. Click on cell A3, for example. It should look like this:
If you click the black down arrow, you should see your list of students. Like the one below:
A drop down list in Excel
Click on any student in the list. The student appears in cell A3. Click on another cell in column A and try it again.
I'm sure you'll agree that it's much better than having to type out a student's name over and over again.
Except we have a slight problem. If you click inside cell A1 you'll see that this too has a drop down list. Clearly we don't want this to happen for our heading. To turn off the list in cell A1, do the following:
  • Click inside cell A1
  • From the Excel menu bar, click on Data
  • From the drop down menu, click Validation
  • From the Settings tab strip of the dialogue box, change "Allow List" to "Allow Any Value"
  • Click OK
Time for you to try it alone. Change the Subject and Grade columns into drop down list, and then turn off the list for the headings cells B1 and C1.
The drop down lists for the Subject and Grade columns should look like these when you're done:
Drop down lists for Subject
Drop down lists for  Grade

In the next part, you'll learn how to display error messages. That way, you can control what data your users are allowed to enter.

Comments

Popular posts from this blog

Beginners PHP  -This is a complete and free PHP programming course for beginners. It's assumed that you already have some HTML skills. But you don't need to be a guru, by any means. If you need a refresher on HTML, then click the link for the Web Design course on the left of this page. Everything you need to get started with this PHP course is set out in section one below. Good luck! Home Page > PHP Section One - An Introduction to PHP 1. What is PHP and Why do I need it? 2. What you need to get started 3. Installing and testing Wampserver 4. Troubleshooting > PHP Two - Getting Started With Variables 1. What is a Variable? 2. Putting text into variables 3. Variables - some practice 4. More variable practice 5. Joining direct text and variable data 6. Adding up in PHP 7. Subtraction 8. Multiplication 9. Division 10. Floating point numbers > PHP Three - Conditional Logic 1. If Statements 2. Using If Statements 3....
Visual Basic .NET Contents Page   -This computer course is an introduction to Visual Basic.NET programming for beginners. This course assumes that you have no programming experience whatsoever. It's a lot easier than you think, and can be a very rewarding hobby! You don't need to buy any software for this course! You can use the new FREE Visual Basic Express Edition from Microsoft. To see which version you need, click below: Getting the free Visual Studio Express - Which version do I need? > VB .NET One - Getting Started   1. Getting started with VB.NET 2. Visual Basic .NET Forms 3. Adding Controls using the Toolbox Home Page 4. Adding a Textbox to the Form 5. Visual Basic .NET and Properties 6. The Text Property 7. Adding a splash of colour 8. Saving your work 9. Create a New Project >   VB .NET Two - Write your first .NET code   1. What is a Variable? 2. Add a coding button to the Form 3. Writing y...
The Excel SumIF Function  - Another useful Excel function is SumIF. This function is like CountIf, except it adds one more argument: SUMIF( range ,  criteria ,  sum_range ) Range and criteria are the same as with  CountIF  - the range of cells to search, and what you want Excel to look for. The Sum_Range is like range, but it searches a new range of cells. To clarify all that, here's what we'll use SumIF for. (Start a new spreadsheet for this.) Five people have ordered goods from us. Some have paid us, but some haven't. The five people are Elisa, Kelly, Steven, Euan, and Holly. We'll use SumIF to calculate how much in total has been paid to us, and how much is still owed. So in Column A, enter the names: In Column B enter how much each person owes: In Column C, enter TRUE or FALSE values. TRUE means they have paid up, and FALSE means they haven't: Add two more labels: Total Paid, and Still Owed. Your spreadsheet should look something li...