Hi,
With the info of some threads on mrexcel I have worked out a formula to get the sum of column M over various sheets:
=+SUMPRODUCT(SUMIF(INDIRECT("'"&SheetList&"'!$C1:$C100000");"*/"&$C45&"/*"&D$6;INDIRECT("'"&SheetList&"'!$m1:$m100000")))
This works fine, but now I would like to rebuild it to get the sum of a certain column dependent on a variable (in this example the variable is 13, which is column M). I thought this would work:
{=+SUMPRODUCT(SUMIF(INDIRECT("'"&SheetList&"'!$C1:$C100000");"*/"&$C45&"/*"&D$6;INDEX(INDIRECT("'"&SheetList&"'!$1:$100000");;13)))}
Nevertheless it gives me a different, incorrect, result.
Does someone know what I am doing wrong?
Thanks!
Emiel
With the info of some threads on mrexcel I have worked out a formula to get the sum of column M over various sheets:
=+SUMPRODUCT(SUMIF(INDIRECT("'"&SheetList&"'!$C1:$C100000");"*/"&$C45&"/*"&D$6;INDIRECT("'"&SheetList&"'!$m1:$m100000")))
This works fine, but now I would like to rebuild it to get the sum of a certain column dependent on a variable (in this example the variable is 13, which is column M). I thought this would work:
{=+SUMPRODUCT(SUMIF(INDIRECT("'"&SheetList&"'!$C1:$C100000");"*/"&$C45&"/*"&D$6;INDEX(INDIRECT("'"&SheetList&"'!$1:$100000");;13)))}
Nevertheless it gives me a different, incorrect, result.
Does someone know what I am doing wrong?
Thanks!
Emiel