I encountered the same problem, and have found a solution for it.
I am maintaining an Excel 2003 add-in (.xla) that contains some UDFs. The add-in is supposed to be able to be used in newer versions of Office as well. However, a customer reported problems when using this add-in from Excel 2007 and 2010: If any of these UDFs is invoked with one or more references to cells outside of the Excel 2003 limits (i.e. 65536 rows and 256 columns) as parameters, these references are sometimes considered ‘invalid’ by Excel, i.e. they are replaced by #REF!, and as a result, the cell’s value is displayed as #VALUE!.
I sometimes succeeded in reproducing this problem, and sometimes I didn’t, until I discovered the following method to reproduce it consistently:
1. In Excel 2007 or 2010 (with the .xla installed), create a fresh workbook that invokes one or more of the UDFs in the .xla. (At this point, it doesn’t matter what values you pass as parameters. Even references to cells outside of the Excel 2003 limits are OK.)
2. Save the workbook (as .xlsx), and close Excel.
3. Reopen the workbook. From now on, if you add an invocation of one of the UDFs with a reference to a cell outside of the Excel 2003 limits as a parameter, the reference is immediately changed to #REF!. (Note: If you added such invocations before reopening the workbook, these cell references were, and still are OK.)
This looks like a bug in Excel 2007/2010: The presence of an Excel 2003 add-in seems to put Excel into a ‘Partial Compatibility Mode’.
The solution is to turn the add-in into an Excel 2007 or 2010 add-in (.xlam). This can be done simply by saving it as such. (This can be done even from Excel 2003, but you cannot use it from that version of Excel).
The sad conclusion is that it apparently is not possible to have a single version of the add-in for Excel 2003 and all newer versions.
Wilfred.