You could use SUMIFS
:
=SUMIFS(Parameters!E:E,Parameters!A:A,A2,Parameters!B:B,B2,Parameters!C:C,"<="&C2,Parameters!D:D,">="&C2)
I don't think there can be overlaps in prices as this wouldn't make much sense to me, so the above should give you the appropriate percentage.
Format as appropriate.
Note: If there is no match, then the function will return 0
.
SUMIFS
will take the sum from the column E
of Parameters, provided that:
- Column A is equal to A2,
- Column B is equal to B2,
- Column C is below C2,
- Column D is above C2