I am working on a sheet where the sumproduct equation is used. This formula is failing:
=SUMPRODUCT($D2:$K2, INDIRECT( ADDRESS(MATCH($B2,P_OIL,0) + ROW(P_OIL) -1, 4 ) &":"& ADDRESS( MATCH( $B2, P_OIL, 0) + ROW(P_OIL) - 1, 11)))
I have tried using the address functions seperately to view their results.
=ADDRESS( MATCH($B2,P_OIL,0) + ROW(P_OIL) - 1, 4 )
Returns $D$43
=ADDRESS( MATCH($B2,P_OIL,0) + ROW(P_OIL) - 1, 11)
Returns $K$43
Therefore, SumProduct should be between the ranges $D2:$K2 and $D$43:$K$43; however, a "#VALUE" error is returned. I have tried changing the absolute referencing for the ranges but this has no effect. Is there a problem with defining the first range explicitly and the second through an INDIRECT function?