I am trying to do dynamic formulae creation and have successfully done in the past, but I am facing a very strange issue whereby using the ROW() formula within the INDIRECT() formula breaks it and it gives a #VALUE error.
If I enter 3 values in column A as below:
A1: 1
A2: 2
A3: 3
I can then enter the following in B1: =SUMPRODUCT(INDIRECT("A"&1&":"&"A3")) which gives the correct answer of 6. However, if I enter in C1: =SUMPRODUCT(INDIRECT("A"&ROW()&":"&"A3")) the answer given is 0 because at the final stage INDIRECT({A1:A3}) evaluates to #VALUE.
If I again change this an in D1 I enter: =ROW() which evaluates to 1 and in E1 I enter: =SUMPRODUCT(INDIRECT("A"&D1&":"&"A3")) it again works no problem.
Can someone please enlighten me as to why the formula in C1 is broken?
Thanks muchly.
Ian
If I enter 3 values in column A as below:
A1: 1
A2: 2
A3: 3
I can then enter the following in B1: =SUMPRODUCT(INDIRECT("A"&1&":"&"A3")) which gives the correct answer of 6. However, if I enter in C1: =SUMPRODUCT(INDIRECT("A"&ROW()&":"&"A3")) the answer given is 0 because at the final stage INDIRECT({A1:A3}) evaluates to #VALUE.
If I again change this an in D1 I enter: =ROW() which evaluates to 1 and in E1 I enter: =SUMPRODUCT(INDIRECT("A"&D1&":"&"A3")) it again works no problem.
Can someone please enlighten me as to why the formula in C1 is broken?
Thanks muchly.
Ian