Use IFERROR.

Eg, this is not specific to your formula but an example of IFERROR used,

=IFERROR(VLOOKUP(B1,C1:D13,2,FALSE),"")
If you can't work this into your formula, post it up.