Interest Ask. There are subtle issues here that I have not seen documented.
It seems that INDIRECT("A"&ROW())
returns an array of one element, which is a reference to a cell, not a value in that cell. Many functions cannot correctly resolve this data type, but some functions, such as N and T, can "play out" the array and return the base value.
Take this case when there are two elements in an array:
=SUM(N(INDIRECT("A"&ROW(1:2))))
This returns A1 + A2 when an array is entered, but it returns A1 only when input. However, changing the ROW (1: 2) to {1; 2} in this formula returns the correct result when typing in the usual way. The equivalent SUMPRODUCT formula returns A1 + A2 whether the array is entered or not.
This may be due to the way the arguments are registered in the function. According to http://msdn.microsoft.com/en-us/library/bb687900.aspx there are two methods for registering function arguments for processing Excel data types:
R / U type: "Values, arrays, and range references."
P / Q type: "Excel converts unicellular references to simple values ββand multicellular references to arrays when preparing these arguments."
The SUM arguments seem to match the R / U type, and the SUMPRODUCT arguments behave like the P / Q type. An array introducing the SUM formula above causes the range reference argument in ROW to be evaluated as an array, whereas this happens automatically with SUMPRODUCT.
Update
After a bit more research, this is another piece of evidence that could support this theory. Based on the link in the comment, the formula = SUM ((A1, A2)) gives the same values ββas:
?executeexcel4macro("CALL(""Xlcall32"",""Excel4"",""2JRJR"",4,,1,(!R1C1,!R2C1))")
Registering the last argument as type P by changing 2JRJR
to 2JRJP
gives an error in this case, but allows us to use ranges for one area, such as !R1C1:!R2C1
. On the other hand, changing 4 (xlfsum) to 228 (xlfsumproduct) allows only references to one area, which it calls in the same way as SUMPRODUCT.