Cột H4: =IF(G4<=F4,G4*INDEX($C$16:$E$18,MATCH(F4,$C$16:$C$18,0),MATCH(RIGHT(B4,3),$D$15:$E$15,0)+1),F4*INDEX($C$16:$E$18,MATCH(F4,$C$16:$C$18,0),MATCH(RIGHT(B4,3),$D$15:$E$15,0)+1))
Cột I4: =IF(G4<=F4,0,(G4-F4)*INDEX($C$16:$G$18,MATCH(F4,$C$16:$C$18,0),MATCH(RIGHT(B4,3),$D$15:$E$15,0)+3))
Cột I4: =IF(G4<=F4,0,(G4-F4)*INDEX($C$16:$G$18,MATCH(F4,$C$16:$C$18,0),MATCH(RIGHT(B4,3),$D$15:$E$15,0)+3))