# Combining Sum / Sumproduct / Subtotal / Countif Not Blank



## ShaneD (Dec 29, 2022)

I have a list of action items that I am tracking the completion of the items for 3 projects. We are continually adding items to the list. When I filter for a specific project I need it to total the number of items that are not complete. 
Cell A3 contains a total count of all items, the result is 50. This formula is =subtotal(3,A6:A44)
Column B is the project that the item is assigned to (Project 1, 2, 3)
Column M is the date the item was completed.
My range is row 6 through 44 because I have rows above my dataset which include the headers, total complete, total remaining (which I am trying to calculate properly when filtered).
The formula that I am using is: =SUM(A3-(SUMPRODUCT(SUBTOTAL(3,OFFSET(M6,ROW(M6:M44)-ROW(M6),0)),--((M6:M44)="<>"))))
But my result keeps returning the total count in cell A3 and not subtracting the number of non blank cells from the total.

Thanks in advance for your help.


----------



## jasonb75 (Dec 30, 2022)

From a quick glance, (M6:M44<>"")


----------



## ShaneD (Dec 30, 2022)

jasonb75 said:


> From a quick glance, (M6:M44<>"")


That worked. Thank you sir!


----------

