I got it.Hi,
Nice one...
Just put the below in I4 and drag it down..to be acknowledged with CTRL + SHIFT + ENTER
INDEX($C$2:$C$33,MATCH(SMALL(IFERROR(1/(LOOKUP(ROW($A$2:$A$33),ROW($A$2:$A$33)/($A$2:$A$33<>""),$A$2:$A$33)=$G$2)*ROW($C$2:$C$33),""),ROW(A1)),ROW($C$2:$C$33),0))
Attached file for reference
But I don't know why I cannot edit on column I and the formula does not work in other cell. Also, I cannot drag it down too.Good one @Asheesh
Here is another try.
First define two names
start =MATCH($G$2,$A$2:$A$33,0)
end =MATCH(1,INDEX($B$2:$B$33,start+1):$B$33,0)+start
Now select a bunch of cells starting I4 and type,
=INDEX($C$2:$C$33,start):INDEX($C$2:$C$33,end)
and press CTRL+Shift+Enter
You should see the results.
See attached file.