Skip to content

Instantly share code, notes, and snippets.

function onEdit(e) {
const sheet = e.source.getActiveSheet();
const name = e.source.getActiveSheet().getName();
const col = e.range.getColumn(), row = e.range.getRow();
if(name == "Jita2BEANSTAR") {
// options mechanics (always one option true per column)
if(col == 7 && (row > 6 && row < 9)) { // SORT OPT
sheet.getRange(7, col, 2, 1).setValue("FALSE");
@xse
xse / summary.js
Last active April 19, 2023 09:04
/*
* updates 'summary' sheet
* uses 'a/c' sheet to link characters and accounts [[header_row],[account1,char1,char2,char3],[account2,....]]
* triggered onOpen
* assume script timezone is set or is by default correct
*/
function summary() {
const timezone = Session.getScriptTimeZone();
const offsetRow = 6;
const offsetCol = 2;