I have an excel sheet with 300 duplicates. I need the first table to look like second table.

I don't know how to use vba.
I thought grouping by names in sql could help. I need guidance on how I could do this in excel.
I've tried with a pivot table but it doesn't exactly give me what I want.
Suggestions on how to achieve this would be great.