I'm having a problem implementing a spreadsheet with several sheets that use data registered continuously on the first.
I found a solution with this script on the forum but I don't know how to edit, I'm a newbie using scripts. It makes a counter in cell T1, every time I edit something he assigns a fixed, sequential number in column A, A2:A1001 called ID. It works for all the cells I edit on every sheets of the spreadsheet. I want it to only work on the first sheet, the numbers appearing in column A, A2:A1001 depending on when I check "OK" in the corresponding cell in column C, C2:C1001, in any order: I mark "OK" in C3, it puts 1 in A3 , mark "OK" in C129, he puts 2 in A129.
Sorry for my English, is not my native language.
function onEdit(e)
{
var sheet = SpreadsheetApp.getActiveSheet();
var row = SpreadsheetApp.getActiveSheet().getActiveCell().getRow();
var bugCount = sheet.getRange("T1").getValue();
bugCount++;
if (sheet.getRange(row, 1).getValue() == "") {
sheet.getRange(row,1).setValue(bugCount);
sheet.getRange("T1").setValue(bugCount);
}
}