Can the sumif function and countif function be used over a range of data that has hidden rows, and not include those rows? Like is there a way to select only 'active' cells?
Thanks!
Can the sumif function and countif function be used over a range of data that has hidden rows, and not include those rows? Like is there a way to select only 'active' cells?
Thanks!
hi JimExcel. assuming your data is in A1:B10 and you want to count how many As are in A1:A10, then:
=SUMPRODUCT((A1:A10="a")*(SUBTOTAL(103,OFFSET(A1,ROW(A1:A10)-ROW(A1),))))
to sum up B1:B10 based on whether A1:A10 is equals to "a", then:
=SUMPRODUCT((A1:A10="a")*(SUBTOTAL(103,OFFSET(A1,ROW(A1:A10)-ROW(A1),)))*(B1:B10))
SUBTOTAL ignores hidden rows. SUMPRODUCT is an alternative for SUMIF & COUNTIF
Thanks, if you have clicked on the * and added our rep.
If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".
"Contentment is not the fulfillment of what you want, but the realization of what you already have."
Tips & Tutorials I Compiled | How to Get Quick & Good Answers
THank you! What if my rows are constantly changing. Is there an easy shortcut to use instead of defining the last row A10 in your example?
Nevermind, for my purposes I can just use subtotal. Thanks for you help.
Hi JimExcel
Also look at the AGGREGATE function as by your profile you have Excel 2010.
http://office.microsoft.com/en-gb/ex...010338704.aspx
Regards Kevin
Merged Cells (They are the work of the devil!!!)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks