Excel – if column a data is same, stack column b in row

I’m working with a data set of two columns. Column A is a set of IDs and Column B is email addresses.

Column A is all unique, but there will be duplicates in Column B.

I’m needing to find the duplicate instances in Column B and consolidate the unique data from Column A in rows next to the first instance of the data in Column B.

So example:

1234.   Abc@mail.com
1256.   Abc@mail.com
1357.   Abc@mail.com

I need this to turn into:

Abc@mail.com.    1234.   1256.  1357. 

Make sense?