Try,
Data sheet H3, formula copy across and down :
=LOOKUP(9.99E+307,CHOOSE(MATCH(IF($D3>H$1,$F3,$B3),{"IDC","BPO"},0),VLOOKUP($E3,'Grid%'!$A$4:$F$10,MATCH($C3,'Grid%'!$A$3:$F$3,0),0),VLOOKUP($E3,'Grid%'!$A$17:$F$20,MATCH($C3,'Grid%'!$A$16:$F$16,0),0)))
Or another option,
=INDEX(('Grid%'!$A$4:$F$10,'Grid%'!$A$17:$F$20),MATCH($E3,CHOOSE(MATCH(IF($D3>H$1,$F3,$B3),{"IDC","BPO"},0),'Grid%'!$A$4:$A$10,'Grid%'!$A$17:$A$20),0),MATCH($C3,CHOOSE(MATCH(IF($D3>H$1,$F3,$B3),{"IDC","BPO"},0),'Grid%'!$A$3:$F$3,'Grid%'!$A$16:$F$16),0),MATCH(IF($D3>H$1,$F3,$B3),{"IDC","BPO"},0))
Regards
Bosco