The date format in the column is not propagating to new rows, whenever new rows are being added to the bottom of the sheet. The column formatting is not automatically applied - this in regards to date, currency format, alignment etc.
Asked
Active
Viewed 2,410 times
3

Alan Wells
- 30,746
- 15
- 104
- 152

Ricardo
- 105
- 1
- 7
-
I think you can click the column heading, so that the entire column is highlighted, then set the format. Any new rows should have the same format as the column as a whole. This isn't a programming question. The question is better suited for some other site. – Alan Wells May 23 '15 at 17:22
-
Unfortunately that ain't so easy, rows added by form submissions don't follow the formatting. Perhaps some script or specific array formula can fix it. Edit: Even if I add a row manually the formatting isn't propagated :( – Ricardo May 23 '15 at 17:49
-
Apps Script can run some code every time a form response is submitted. [Installable Form Submit Trigger](https://developers.google.com/apps-script/guides/triggers/events#google_sheets_events) – Alan Wells May 23 '15 at 18:09
1 Answers
0
Create a function that will run when the form is submitted:
Managing Triggers Manually - Google Documenation
Code.gs
function respondToFormSubmit() {
//Format entire columns
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var range = sheet.getRange("M:Y");
range.setNumberFormat('dd.mm');
};

Alan Wells
- 30,746
- 15
- 104
- 152
-
Thanks, I set the trigger to on form submission and started first trail using the code above with 'var cell = sheet.getRange("M:Y"); cell.setNumberFormat('dd.mm');' If I execute it this applied correctly, a new submission also triggers it but the cell is not formated - can you advice? – Ricardo May 23 '15 at 18:56
-
See updated answer. I've tested it, and it works. Please mark answer as correct. – Alan Wells May 23 '15 at 19:36
-
Thanks, this works fine! I surrender to the remaining formatting though - that's over my head. :) – Ricardo May 25 '15 at 07:24
-
Why the hell isn't number formatting for an entire column just automatically applied to any new rows added to it..? Ridiculous that we should need a script to do this – Inigo Feb 22 '19 at 13:04
-
@Inigo You can search the [Issue Tracker](https://issuetracker.google.com) at "https://issuetracker.google.com" for the same complaint, and star it, or file a new feature request. – Alan Wells Feb 22 '19 at 14:22