I have an index function call, where array is in another workbook (open one), and the rowref for the INDEX call is another cell. The formula is then filled down.
So, it looks like this:
=INDEX([xxx.xlsm]ComplCampAll!$A$1:$A$6621,Q2,1)
(so, the above fills down to Q2, Q3, Q4...)
In all cases, the returned value appears to be correct to me, EXCEPT when the value in Column Q (which is the row argument to the INDEX() call) is equal to 0 (zero). In that case, i expect #VALUE to be the result. But instead i get an actual result.
In fact, what is returned a value retrieved from the array, in the row in the array that is equal to the row number of the cell in calling sheet.
For example, if in row 8 i have
=INDEX([xxx.xlsm]ComplCampAll!$A$1:$A$6621,Q8,1)
and if the value in cell Q8 is 0, i get a result as if the call were as follows:
=INDEX([xxx.xlsm]ComplCampAll!$A$1:$A$6621,8,1)
...and, that in all such cases.
As a further test, i tried INDEX() with the array on the same worksheet, and in all cases i constructed, where row=0, i get #VALUE for the result.
So, does anybody have advice here? Is there a known defect when the array argument to INDEX() is in a different workbook, or anything special i need to do in that case?
Thanks for any advice on this very confusing situation!
Tom
So, it looks like this:
=INDEX([xxx.xlsm]ComplCampAll!$A$1:$A$6621,Q2,1)
(so, the above fills down to Q2, Q3, Q4...)
In all cases, the returned value appears to be correct to me, EXCEPT when the value in Column Q (which is the row argument to the INDEX() call) is equal to 0 (zero). In that case, i expect #VALUE to be the result. But instead i get an actual result.
In fact, what is returned a value retrieved from the array, in the row in the array that is equal to the row number of the cell in calling sheet.
For example, if in row 8 i have
=INDEX([xxx.xlsm]ComplCampAll!$A$1:$A$6621,Q8,1)
and if the value in cell Q8 is 0, i get a result as if the call were as follows:
=INDEX([xxx.xlsm]ComplCampAll!$A$1:$A$6621,8,1)
...and, that in all such cases.
As a further test, i tried INDEX() with the array on the same worksheet, and in all cases i constructed, where row=0, i get #VALUE for the result.
So, does anybody have advice here? Is there a known defect when the array argument to INDEX() is in a different workbook, or anything special i need to do in that case?
Thanks for any advice on this very confusing situation!
Tom