Your formula is this:
=IFERROR(INDEX($B$19:$B$25,SMALL(IF($A$19:$A$25= $G$18,ROW($19:$25) -1,""),ROW() -1)),"")
It should be this:
=IFERROR(INDEX($B$19:$B$25,SMALL(IF($A$19:$A$25= $G$18,ROW($A$19:$A$25) -ROW($A$19)+1),ROW() -ROW($G$19)+1)),"")
So
ROW($A$19:$A$25)-ROW($A$19)+1 gives you {1;2;3;4;5;6;7}
and
,ROW()-ROW($G$19)+1 will give you {1} when the formula is on row 19, {2} when the formula is on row 20, etc
|