Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function dublicates() {
- let ss = SpreadsheetApp.getActiveSpreadsheet();
- let ui = SpreadsheetApp.getUi()
- let activeCell = ss.getActiveSheet().getActiveCell();
- let sheets = ss.getSheets();
- for(var i=0; i<sheets.length-1;i++){
- let range = (sheets[i].getRange(2, 2,sheets[i].getLastRow()-1).getValues()).map(function(row){return row[0]});
- let mach = range.indexOf(activeCell.getValue())
- if(mach !== -1 && activeCell.getValue() !== ""){
- ui.alert(`Заказ был на ${sheets[i].getSheetName()}`)
- }
- }
- console.log(mach,range)
- }
Add Comment
Please, Sign In to add comment