I have two excel sheets one with this image of sheet2
on which I need to get the matching rows from sheet1 to match x from column C and show all data on sheet2. Sheet1 image is
I am using this formula
=INDEX(sheet1!$D:$J,MATCH("x", sheet1!$C:$C,0), MATCH(B$2, sheet1!$B$5:$J$5,0))
but it only gets the first x row not other rows and i want to add rows to sheet2 whenever sheet1 column C contains x value so sheet2 automatically updates with a new row inserted in sheet1.