I need to do a conditional subtotal on a field. If any cell in column A is the value "R" then sum the associated value in column B. How can I accomplish this with a subtotal? I need to use subtotal because autofiltering can be used on many different columns.
I could split out the value in column B based on the value in column A and subtotal those columns individually, but this spreadsheet is huge and contains many columns that I have to total based on this condition so I would rather not have to do that.
I have to use the subtotal function because the spreadsheet can be filtered on by many different fields and the totals need to reflect only those records that are being filtered, that's why I can't use the sumif.
I don't know how to tell the subtotal command to look at every cell in column A for an "R" and sum the associated value in column B. If I use a condition with the subtotal it only looks at one cell:
=IF(A12="R",(SUBTOTAL(9,B12:B45623)),0)
How do I give it a range condition?
That would certainly work but I would have to do it for over 10 columns that I'm trying to subtotal. I was looking for a way to do it more dynamically through a formula.
It looks like that might not be possible.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.