Hi Excelakos,
I've started a new thread so we don't continue to hijack the previous thread with a different problem.
Here is the same solution across sheets, just change the names & ranges to what you need and test if it suits;
| A | B | C | D |
---|
Service Code | Rate Valid From (dd/mm/yy) | Rate Valid to (dd/mm/yy) | | |
A | | | | |
A | | | | |
A | | | | |
B | | | | |
B | | | | |
| | | | |
<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"]Rate[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]15-03-19[/TD]
[TD="align: right"]14-04-19[/TD]
[TD="align: right"]5.25[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]15-02-19[/TD]
[TD="align: right"]14-03-19[/TD]
[TD="align: right"]4.75[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]15-01-19[/TD]
[TD="align: right"]14-02-19[/TD]
[TD="align: right"]4.5[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]03-04-19[/TD]
[TD="align: right"]02-05-19[/TD]
[TD="align: right"]9.5[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]12-06-18[/TD]
[TD="align: right"]11-07-18[/TD]
[TD="align: right"]8.5[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
</tbody>
Pricelist
[TABLE="width: 85%"]
<tbody>[TR]
[TD]
Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C2[/TH]
[TD="align: left"]=EDATE(
B2,1)-1[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
| A | B | C |
---|
Service Code | Date of Sale | | |
A | | | |
A | | | |
A | | | |
B | | | |
B | | | |
B | | | |
<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"]Cost[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]12-03-19[/TD]
[TD="align: right"]4.75[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]25-01-19[/TD]
[TD="align: right"]4.5[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]18-03-19[/TD]
[TD="align: right"]5.25[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]02-05-19[/TD]
[TD="align: right"]9.5[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]07-04-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]27-06-18[/TD]
[TD="align: right"]8.5[/TD]
</tbody>
Service
[TABLE="width: 85%"]
<tbody>[TR]
[TD]
Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C2[/TH]
[TD="align: left"]=SUMPRODUCT(
(B2>=Pricelist!$B$2:$B$6)*(B2<=Pricelist!$C$2:$C$6)*(A2=Pricelist!$A$2:$A$6)*Pricelist!$D$2:$D$6)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]