How to Auto Format Google Form Responses in Google Sheets

When you submit a Google Form, it stores a copy of the form response as a new row in the Google Sheet. The only problem here is that Google Forms will not add any formatting or styles to the new row that you may have applied to the previous rows of the sheet. Let me illustrate this with a small example.

Here’s a Google Sheet that is storing Google Form responses. I’ve changed the default font family to Droid Sans center-aligned the Country and Age column and also applied a different date format to the Date of Birth column.

image 9
How to Auto Format Google Form Responses in Google Sheets 3

Everything looks good but as soon as a new form submissions is made, the new row appended to the Google Sheet via Google Forms will lose all the formatting.

The cell alignment is not preserved, the custom date formats are ignored and so is the default font size and font family. Here’s a screenshot of the same sheet but with a new row added through Google Forms.

image 10
How to Auto Format Google Form Responses in Google Sheets 4

Auto Format New Rows in Google Sheets

Since there’s no way for us to override this Google Forms behavior, we can take the help of Google Apps Script to automatically format new rows in Google Sheets that are added through Google Forms.

The idea is simple. We’ll create an on Form Submit trigger inside the Google Sheet that will be executed whenever a new form is submitted. This trigger will take whatever formatting that has been applied to the previous row and apply to the current row.

To get started, open the Google Sheet and format the last row with the styles that you would like to apply to incoming form responses.

Next, go to Extensions > Apps Script menu and copy-paste the Google Script below. Run the createTrigger and you are good to go!

Recent Articles

Related Stories

Stay on op - Ge the daily news in your inbox