Quote Originally Posted by NBVC View Post
Try this:

In I4 add helper formula:

=IF(H4=$C$2,COUNT(I$3:I3)+1,"")

copied down

In L4 add helper formula:

=IF(K4=$C$2,MAX($I$4:$I$7)+COUNT(L$3:L3)+1,"")

then in B7 use formula:

=IFERROR(INDEX(G$4:G$7,MATCH(ROWS(B$7:B7),$I$4:$I$7,0)),IFERROR(INDEX(J$4:J$7,MATCH(ROWS(B$7:B7),$L$4:$L$7,0)),""))

copied to next column and down.

In D7:

=IF(ISNUMBER(MATCH(ROWS(D$7:D7),$I$4:$I$7,0)),$G$2,IF(ISNUMBER(MATCH(ROWS(D$7:D7),$L$4:$L$7,0)),$J$2,""))

copied down
Perfect, thanks again!... how did you ever learn this stuff?