Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

Is it possible to sum a range of cells while ignoring rows which are not hidden?

Thanks

share|improve this question
1  
Unfortunately, this is not possible via formula's or Google Apps Script. See this Q&A on Stack Overflow: stackoverflow.com/q/6793805/1536038. Please follow the feature request and star it !! –  Jacob Jan Tuinstra Jun 19 '13 at 11:24
    
Thanks for pointing that out :) –  Sam Jun 19 '13 at 15:45
add comment

2 Answers 2

Turns out its not possible (for now).

Feature request: https://code.google.com/p/google-apps-script-issues/issues/detail?id=195

share|improve this answer
add comment

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 sum only rows that are not hidden with SUBTOTAL.

For example:

=SUBTOTAL(109;A:A)

will sum all cells in column A that are not hidden.

share|improve this answer
    
Where can the reference be found regarding the function_code argument? I've learned something today !! Thanks for that. –  Jacob Jan Tuinstra Jun 20 '13 at 5:55
1  
Unfortunately the Google Docs documentation leaves something to be desired (the links within that blog post used to work). In this case I think it would be reasonably safe to rely on the Excel documentation: office.microsoft.com/en-au/excel-help/… –  AdamL Jun 20 '13 at 6:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.