用IF函数就可以了
在D1单元格输入:
=IF(COUNTIF(A1:C1,"")=3,N-3,IF(COUNTIF(A1:C1,"")=2,N-2,IF(COUNTIF(A1:C1,"")=1,N-1,N)))