Is it possible to sum a range of cells while ignoring rows which are not hidden?
Google-sheets – Google Spreadsheets sum only shown rows
formulasgoogle sheets
Related Topic
- Google-sheets – Dynamic generation of cell list / array from range value in Google Spreadsheets
- Google-sheets – Sum the numeric part of cells that contain specific strings
- Google-sheets – Extract and sum numbers from a range of cells containing text and ignore empty cells
- Google-sheets – Search in hidden rows in Google Sheet
- Google-sheets – How to select multiple rows in Google Sheets and do a sort
- Google-sheets – Google Sheets SUMIF with only different sum range size than
- Google-sheets – Safe SUM() in Google Sheets
- Google-sheets – Sum value in cells that contain both number and text
Best Answer
I'm not sure if you necessarily require a Google Apps Script solution; the tags you have used suggest that a spreadsheet formula might be adequate. If this is the case, then it is definitely possible to achieve this using SUBTOTAL.
For example:
will sum all cells in column A that are not hidden.
109
is thefunction_code
which consists of 9 for SUM, prepended with 10 so hidden values will be skipped.Your question requests that the sum should be "ignoring rows that are not hidden", which, I believe, is equivalent to "sum the hidden rows". This may be achieved using: