Xandler, Do you really happy ??? I can give you more dynamic formula which will make you much happy ... Imagine you sample type more than 2 means 8 or 9 or much more then ????
You Can try
First make a helper column
B14
Formula:
=IF(C14="","",IF(C14=$D$5,C14,B13))
Drag down..
G6
Formula:
=INDEX(OFFSET($B$1,MATCH($D$5,$C:$C,0),2,COUNTIFS($B:$B,$D$5),5),MATCH($D$8,OFFSET($B$1,MATCH($D$5,$C:$C,0),1,COUNTIFS($B:$B,$D$5),),0),MATCH(F5,$D$14:$H$14,0))
Paste the same formula in other cells.
Check the attached file.
Bookmarks