First, I am going to help because I can see what you want to do, but your thread title isn't descriptive of your question. Usually I would flag it as a title violation but I'm going to just change it since I want to help answer this.
First, you are returning a string. I'm sure that you want to return a number instead, so remove the quotes.
Second, there is no need to use the SUM function to enclose an arithmetic operation. SUM is for taking the sum of a list of values.
Third you will get a cleaner formula using IFERROR.
Here is a revised formula that does what your original does:
Now here it is with the added logic you requested:
Bookmarks