=COUNTBLANK(C6:INDEX(C:C,SUMPRODUCT(MAX(($A:$A<>"")*ROW(C:C)))))

I've then added in another criteria (which is where my problem is) and I've used an AND function to

__also__not add to the count if there is any text string that includes the letters "test" in column B. I don't get an error with my syntax but this returns the wrong calculated value:-

=COUNTBLANK(C6:INDEX(C:C,AND(SUMPRODUCT(MAX(($A:$A<>""),SUMPRODUCT(($B:$B<>"Test*")*ROW(C:C)))))))

Can anyone see what my problem is?

Thanks