Time:11-07
Example sheet link :
and:
=INDEX(IFNA(VLOOKUP(I8:I, B3:F, IF(J8:J=C2, {2, 4}, {3, 5}), 0)))
Page link:https//www.codepudding.com/Softwaredesign/181868.html