I have a Google sheet trigger that splits the values in Column F when any value in that column gets edited. However I want the script to only split the 'last row', and not all the rows (even the ones above already split)
Which line of code should I add to have the script only split the last edited row in column F and not the entire range? This is my sample so far:
function Split() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('F2:F50').activate();
spreadsheet.getRange('F2:F50').splitTextToColumns();
spreadsheet.getRange('F2:F50').splitTextToColumns(SpreadsheetApp.TextToColumnsDelimiter.COMMA);
};
Kind regards, Brendon