I am trying to create a a formula where if a cell is blank it don't add it in.

This is what I have so far.

=SUM((31-K2),(31-N2),(31-Q2),(31-T2))

The issue with this is that I am using this cell in an average and if K2,N2,Q2,orT2 is left blank it messes up the overall average.

Is there a way to get if lets say T2 doesn't have anything in the cell its not automatically adding in 31?