Although I am sure all the above suggestions will work, I would ask you to upload a sample file with your formula so that we can have a better look of it.
Going by the recent discussions about the use of IFERROR , I would suggest this alternative :
If you know that the source of the error is the source (!) cell being empty or blank , check for that ; using an IF statement around your formula should suffice :