On the Test2 sheet make the following modification to the formula in K5 and down:
Formula: copy to clipboard
=IFERROR(INDEX(C:C,MATCH(J5,A:A,0)),IF(LEFT(K4,6)="Client","",IFERROR(INDEX(B:B,MATCH(J5+2,A:A,0)),"")))

Let me know if you have any questions.