is it #NAME? or $#NUM! error?

In Excel 2003 you cannot use whole column references with Array formulas like this one.

Make all your ranges 800 rows high like the first range you reference.