I have sheet. In column A I have simbol ☑ in some cells. I need that active cell moves to cell after last cell with ☑ simbol. Now code doesn't work as I want. Please help me to change code. Thanks.
Here is my code
function LastCellInCollA() {
var sheet = SpreadsheetApp.getActiveSheet()
var cell = sheet.getRange(2, 1, 1, 1);
var i
sheet.setCurrentCell(cell);
for (i = 2; i < 146; i++)
var valuei = sheet.getRange(i, 1, 1, 1).getValues();
{
if (valuei = "☑️")
{
sheet.setCurrentCell(sheet.getRange(i, 1, 1, 1));
i = i + 1;
}
}
}
setCurrentCell()should be used here. You are only changing the selected cell in UI