I have a spreadsheet with auto filtering. I want to use the SUMIF function, but when I do, it sums the entire spreadsheet and not what I have filtered. Is there a way to do this?
As Geoff said, SUMPRODUCT is needed to calculate data as a filter would show it, but if you are using filters and you have filtered to what you need, then I don't see why SUBTOTAL will not do as you ask. Theoretically you have already filtered to show just what you need, in which case being able to sum the visible data should accomplish this, hence the use of the SUBTOTAL function?
Regards
Ken.....................
----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission
Ken - I think he only wants the sum of the 3s where it is >=1 - at the moment, there are other numbers apart from the 3s in there. However, this could be accomplished by filtering on the 3s after the >=1 and then applying the subtotal
Rgds, Geoff
Never test the depth of water with both feet
Help us to help you by reading FAQ222-2244 before you ask a question
k. - so what is your question ???
You've just been given the answer - which is basically that you can use SUMPRODUCT (but you must include the filter arguments as one of the conditions)
OR - you can filter the data a bit more and use SUBTOTAL
Rgds, Geoff
Never test the depth of water with both feet
Help us to help you by reading FAQ222-2244 before you ask a question
But, you don't need to filter your sheet by ANYTHING. You an have SUMPRODUCT() do that for you. Place your criterea in a cell (eg. D1) and then the lowest date in D2 and the highest date in D3. In cell D4 you enter the formula:
This is assuming that your data is located in the range A1:C100. The formula will only return the total "sales" for the product in D1 if the date is between the two dates in cells D2 and D3.
I hope this helps!
Peace!!
Mike
Didn't get the answers that you wanted? Take a look at FAQ219-2884
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.