Now I'm trying to use a sumproduct with a indirect formula:

the sumproduct I have is:

=SUMPRODUCT(--(VOLUMES!$A$1:$A$10000=DATABASE!A4);--(VOLUMES!$B$1:$B$10000=DATABASE!B4);(VOLUMES!$C$1:$C$10000))

and I changed it as follows:

=SUMPRODUCT(--(VOLUMES!$A$11:$A$10010=DATABASE!A4);--(VOLUMES!$B$11:$B$10010=DATABASE!B4);INDIRECT(VLOOKUP(Sheet4!D9;VOLUMES!A1:B2;2;FALSE)))

If I evaluate the formula, it seems that something is wrong with the indirect resulting in an #REF error.

Edit: where the value in the lookup table is:

Anyone out here wanna help me. (I know, I have been asking lots of questions today, sorry)(VOLUMES!$C$11:$C$10010)