Solved Adding IF statement to subtotal command

July 22, 2016 at 04:47:58
Specs: Windows 7
I need a formula to give me a sum total based on the visible data because I am using a filter. I know the subtotal command does this but I also need to set a criteria. If I use the sumifs only it adds up all data even filtered out data =(SUMIFS(F7:F20746,K7:K20746,"Y")) but I only want the filtered data.

Logic: sum up range F7:F20746 if range k7:k20746 = "Y"

This is what I tried but it gives me an error:

message edited by mecerrato

See More: Adding IF statement to subtotal command

Report •

July 22, 2016 at 06:03:19
✔ Best Answer
I won't take credit for this, but I will take credit for knowing when to use Google. ;-)

Stolen without permission from then following site and then modified to match your ranges:


Don't ask me how it works, I haven't spent any time reverse engineering the formula. If you really want to know how it works, use the Evaluate Formula feature to single step through the formula. If you plan to try that, I suggest that you shorten the range to just a few cells to make it easier to follow.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •

July 22, 2016 at 06:07:37
It works like a charm, thanks

Report •
Related Solutions

Ask Question