Simple way is to add another column to table - e.g. called helper
with a formula like this
=SUBTOTAL(103, B2)
where column B is Result column
Now change formula to
=COUNTIFS(Table1[Result],"Fail", Table1[Comments], "",Table1[Helper],1)
the subtotal formula only returns 1 on visible rows
Without a helper column you can use this formula
=SUMPRODUCT((Table1[Result]="Fail")*(Table1[Comments]=""),SUBTOTAL(103,OFFSET(Table1[Result],ROW(Table1[Result])-MIN(ROW(Table1[Result])),0,1,1)))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…