=<start value>-SUMIF(<range of Y/N>, <condition>, <range of values>)
e.g. for a sheet with:
Y
N
You would use =100-SUMIF(A1:A10, "=Y", B1:B10)
=100-SUMIF(A1:A10, "=Y", B1:B10)