How to create a Data Entry form in Google Sheets

When it comes to mass data entry works, it is essential to use data entry forms to improve accuracy and speed. This tutorial will show you how to create a data entry form in Google Sheets. With Google Sheets, it has many advantages over data entry forms like MS Access installed on your local computer.

The default form option that comes with the Google sheet (Google Form) is not suitable for mass data entry works. Instead of that, you can use Google Apps-Scripts to build a data entry form in Google Sheets or to build web apps.

In this post, I will show you how to create a data entry form in Google Sheets itself to use for mass data entry works.

In the previous post, I explained, “How to Create a Dependent Drop-Down List in Google Sheets“. Here I am going to use those two fields as part of the data entry form.

Creating the form interface

You can simply create the form interface by taking the cells as input fields. The following form includes six input fields namely “Region”, “Country”, “Population” “GDP”, “Area”, and “Literacy” in D4, D6, D10, D12, G10, and G12 cells respectively.

Figure 01: Data entry form

You can protect the entire sheet except the input fields to prevent users from editing the other cells.

The “Save” button

Here I am using an image as the save button. (Later I will assign Apps Script function to this image to copy the data into another sheet once you clicked it).

To create this image go to, Insert > Drawing and then draw a rounded rectangle using the Rounded Rectangle shape tool. Then add your text and add colors using color tools.

Apps script to copy data from the form to another sheet

Once you click the save button, the data in the input field should copy to another sheet. This task can be achieved through Google Apps Scripts.

To access Script Editor, go to Extensions > Apps Script. Give a name to your project. Then copy the following script to the script editor and save it.

Rename your sheet with the form as “Form” and another sheet as “Data“. We are going to copy the data in the Form to this “Data” sheet.

Assign Apps Script to save button

Now you can assign the function submitData() to the save button (actually the image). To do that, click on the image and then click the menu icon in the top right corner of the image. Then select the “Assign script” option. In the text box type your function name, submitData and click OK.

Now you can fill out the form and copy the data to the “Data” sheet by clicking the save button.

You can make a copy of the Google Sheets with the above form and the script from the following link to your Google Drive. If you are new to Google Apps Script, copying and modifying the Google Sheet will be easy for you.

Make a copy of the above Google Sheet
Go to Extensions > Apps Script to view the code

Google Sheets1

What next?

The above code does not clear the input fields after submitting the data. You can use the clear() function to clear the required fields after submitting the data to the “Data” sheet.

The data validation part is another essential part of data entry forms. You can check the values of the field before they copy to the “Data” sheet using conditional statements. Then you can provide meaningful error messages to the user using Browser.msgBox("Error message!")function.

Even though this method is better for mass data entry works than Google Forms, there are a number of other issues. You have to grant edit permission to the user to the “Data” in order to copy the form data to it. Therefore some errors can happen during the data entry. The form is also not much user-friendly.

In order to overcome those issues, you can build your own web app using Google Apps Script HTML Service.

If you wish to create a more advanced data entry form for Google Sheets you may read our other tutorial on web apps.

Wrapping Up

In this tutorial, I showed you the easiest methods that you can use to create a data entry form in Google Sheets. However, as mentioned above, there are some disadvantages to using this method. Some of these can be overcome by creating Sidebar & Modal Dialog forms in Google Sheets.

Share via
Copy link