range.setValues(newData); // Тут затираются формулы
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var range = sheet.getRange("A1:C7");
// Sorts by the values in the first column (A)
range.sort(1);
// Sorts by the values in the second column (B)
range.sort(2);
// Sorts descending by column B
range.sort({column: 2, ascending: false});
// Sorts descending by column B, then ascending by column A
// Note the use of an array
range.sort([{column: 2, ascending: false}, {column: 1, ascending: true}]);
(getFullYear()-1700)
=ARRAYFORMULA(let(
author; "@ProgrammerForever";
dates; hook!A2:A;
type; hook!B2:B;
duration; hook!G2:G;
lookupdates;A2:A;
timestampTodate;lambda(unixTimestamp;(unixTimestamp/86400000)+ДАТА(1970;1;1));
toSqldate;lambda(d;ТЕКСТ(d;"yyyy-mm-dd"));
remove_header;lambda(data;query({data};"SELECT * OFFSET 1";0));
data;remove_header(query({toSqldate(timestampTodate(dates))\duration};"SELECT Col1, Sum(Col2) GROUP BY Col1"));
out;ЕСЛИОШИБКА(ВПР(toSqldate(lookupdates);data;2;0));
ЕСЛИ(lookupdates="";;out)
))
частота_ноты*(1+2^(1/12) )
частота_ноты*(1-2^(1/12) )