I have a spreadsheet that I need a unique id where the first character is a letter, the six next characters are the date and the 2 last a unique number between 0-99 where format need to be in 2 characters. I tried to increment by 1 the row count but the issue is that if someone delete a row the next rows to be inputted will have false and duplicated ID.
thanks in advance
function test(){
var ss = SpreadsheetApp.openById('XXXXXXXXXXXXXXXXXXXXXXXX').getSheetByName('Sheet1');
var range = SpreadsheetApp.getActiveSheet().getLastRow()+1;
var formatDate = Utilities.formatDate(new Date(), "GMT+8", "ddMMyy");
var id = "T"+formatDate+range;
ss.appendRow([id])
}