I am using a script to pull information from multiple other sources, and in that script I have a section which adds a new column, and then sets the value to format the cell beside it.spreadsheet = SpreadsheetApp.getActiveSpreadsheet();  sheet = spreadsheet.getSheetByName('Manila_Data');  sheet.clear();  sheet.getRange(manila_A1_notation).setValues(manila_data);  sheet.insertColumnBefore(3);  sheet.getRange(1, 3).setValue('EQ Number Fixed');  var last_row = sheet.getLastRow();  for (var i = 2; i < last_row+1; i++) {    var cell = sheet.getRange(i, 3);    cell.setFormula('=IF(LEN(B'+i+')<10,CONCATENATE(LEFT(B'+i+',3), ,UPPER(MID(B'+i+',4,4))),IF(LEN(B'+i+')>10,CONCATENATE(LEFT(B'+i+',3), ,UPPER(MID(B'+i+',4,4)), ,UPPER(MID(B'+i+',8,4)))))');     }What I have been getting back as a result in some (not all) instances is|333CY31VV10 |  33 3CY3 1VV1|This is certainly not the intended result, however I have found that if I click on the unformatted cell and do nothing other than click enter/return the appropriate result populates without any other interaction, this only affects the row which was clicked on, and does not update any of the surrounding cells.Has anyone else encountered this issue, or any thoughts as to what might be causing the formula to require this type of manual response?
Cell formula inconsistently updating values
google spreadsheets;google apps script