I'm trying to have an auto sort function only impact one sheet in a workbook rather than all of them... I've done this in other projects and def messed this up along the way - any help is appreciated!!
Here's where I'm at:
SORT_SHEET_NAME = "Active Portfolio";SORT_DATA_RANGE = "A2:043";SORT_ORDER = [{column: 11, ascending: true},{column: 10, ascending: true},{column: 1, ascending: true}];function onEdit(e){ multiSortColumns();}function multiSortColumns(){ var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getActiveSheet(); var range = sheet.getRange(SORT_DATA_RANGE); range.sort(SORT_ORDER); ss.toast('Ya Done Good, Kid.');}It sorts correctly on that sheet, but I don't want all the sheets to sort. Thanks!