Hello Excel gurus!

I have some data that I've collected that I am trying to transform, and I can't seem to figure it out. Any help is greatly appreciated!

Background:
The data that I've collected is based on the people who attend certain events. There is a line, or record, for each individual who attends an event, with a unique code for each individual and for each event. Multiple people can attend the same event, and the same people can attend multiple events.

Directed Outcome:
I would like to create a VBA to transform the data (I've got a lot of this type of data) to have two people linked if they attended an event together. I would also like a count for each pair of people representing how many events these two people attended together.

I've attached a workbook with an example. I've tried everything I know with Pivot Tables and VLOOKUP, but haven't been able to get anywhere. As I mentioned, I have a lot of data formatted in this same way, so I would really love an automated solution to transform the people-to-event relations to people-to-people relations.

Hopefully this isn't too confusing! Thank you for your time!

--Curtis

people-to-event.xlsx