Last active
May 1, 2022 20:03
-
-
Save pstoll/49c339583e51ca4fda46675d92c2d5cc to your computer and use it in GitHub Desktop.
GoogleSheet Group Category Reports Macros
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
/** @OnlyCurrentDoc */ | |
/** If you use Tiller & Category Rollup reports, this macro will create the groups to hide/collapse each level of report | |
* code from https://stackoverflow.com/questions/67784454/group-and-collapse-rows-in-google-apps-script | |
* relevant docs: | |
* https://community.tillerhq.com/t/docs-category-rollup-report/121 | |
* https://spreadsheet.dev/reading-from-writing-to-range-in-google-sheets-using-apps-script | |
* | |
*/ | |
function GroupSelectedColumn() { | |
groupRowsInCatRollUpReport() | |
return; | |
} | |
… : sheet.getDataRange() | |
).getDisplayValues(); | |
let row = values.length - 1; | |
while (row && !values[row].join('')) row--; | |
return row + 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment