Hi Guys

I have data in the cell ranges A1 to B4566. In column A are postcodes, in column B are email addresses. There are multiple instances of postcodes per email address, on separate rows. For example:
Col A Col B
0100 Email 1
0100 Email 2
0100 Email 3
0200 Email 4
0200 Email 5
0300 Email 6
0300 Email 7

I have a list of postcodes I need to extract Emails for, in the cell range R1:R308. I also have another list in T1:T198.
For example, if R1 contains 0100, R2 contains 0200 etc, I want to be able to drag the formula both horizontally and vertically to capture all data, so I'm left with something like:
0100 email 1 email 2 email 3
0200 email 4 email 5
0300 Email 6 Email 7

Where the number values are the list in column S and the emails are the index formula.

At the moment here is what I have but it is giving me a #num error:

=INDEX($B$1:$B$4566,SMALL(IF($R1=$A$1:$A$4566,ROW($A$1:$A$4566)-ROW($A$1)+1),COLUMN(A1)))
Thanks in advance for any help.