Yes! You are totally right. And you could combine with Sequence to, for example, do more complicated sequences like REF-001, REF-002, etc. Here is a video where I explore that ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-eWGr7ZZFN5w.html However it has the same disadvantage that the sequence has: if you reorder or add rows in the middle, the ref for each row will change Thanks for the comment! Regards!
Excelent video! where I work we are moving too GoogleWorkspace from Office so it has been a little difficult learning what we can do and can't. First time using Apps Script, Thanks! Question: Is there a way to make that consecutive number to have letters? like A24X001, A24X002, etc? gracias/Thanks, again!
Thanks for the words! Try this if(rowToWrite>2) consecutive="Ref #"+ (sheet.getRange(rowToWrite-1,colToWrite).getValue()+1) sheet.getRange(rowToWrite,colToWrite).setValue("Ref # "+consecutive) Kind Regards
@@practicalsheets I am trying to do this also (A-0001, A-0002, etc.) but I literally have no formula experience and don't know where to start with your info. above. Can you help in layman's terms? I would start the sequence in the second row like in your video.
@@brigidgifford2837 The easiest way is to select your column in Sheets, and go to "Format" > "Number" > "Custom Number Format" and paste this pattern "A-"00000. The catch is that new responses don´t retain the format. You may want to try formatting as a table or using a macro for this Kind Regards
Hi the code is great but if you sort the sheet and a lower number is in the last row when adding a new form response it takes the new consecutive number from the last row which adds a new sequential number but not the actual last number if you know what i mean. could you help with this as we sort the sheet into an order that suits us