Sometimes errors are the inbuilt factor in your formula construct (for example, suppose you are using a VLOOKUP and it is unable to find a value, then it returns the #N/A error).
Here is a method that can handle that error for you:
For Excel 2007 and above
MS Excel team added a new formula in Excel 2007 – the IFERROR function
• Syntax - IFERROR(value, value_if_error)