Reputation: 11
When I run a script on another sheet, the screen switches to that other sheet. How to make this script, which is executed on another sheet, we do not notice. Thank you for your help.
function derniereLigneColCC() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("Commande");
var startRow = '1'; // ligne départ = 1, modifiable si besoin
var valColonneB = sheet.getRange("B1:B").getValues();
var lignesColonneB = valColonneB.filter(String).length;
var activer = sheet.getRange(lignesColonneB + 6, 2).activate(); // activer dans la colonne B la dernière cellule non vide
var Inscrire = activer.setValue("High");
}
Upvotes: 0
Views: 18