Last active
June 25, 2018 14:40
-
-
Save oshliaer/d2a1a070dda8be904d2ca81efecc4acd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Возвращает массив сумм строк диапазонов | |
| * | |
| * @param {Sheet1!A1:C5} value Находит суммы строк заданного диапазона. | |
| * @returns { *[] } Суммы строк | |
| * @customfunction | |
| */ | |
| function SUMLINE(value) { | |
| if(!Array.isArray(value)) | |
| throw new Error( "Требуется диапазон значений" ); | |
| return value.map(function(row) { | |
| return row.reduce(function(p, c) { | |
| return p += c; | |
| }, 0); | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

