|There is a mistake other wise you wouldn't be get #REf|
You need to trace the dependencies and to cells with the error and you will come eventually find the error. You can all use the built in error trace to track down where the error occurs.
Tools/Formual Editing/Trace Error
At least this is one Excel 2002 On later versions it may be different but the same principle applies.