I think this will be close to what you want. Be aware that since the same names appear in column A as in column B in the output sheet, there will be duplicate results. For example, if Person A and Person X both attended Event 1, you would get
Person A | Person X | 1
Person X | Person A | 1
I didn't know if that was ok or not, so I left it.
Sub PersonEvents()
Dim PerRw As Long, EvRw As Long, OutRw As Long, OutSheet As Worksheet
Sheets("current format").Select
Range("A1").Sort key1:=Range("A1"), order1:=xlAscending, key2:=Range("B1"), order1:=xlAscending, Header:=xlGuess
On Error Resume Next
Application.DisplayAlerts = False
Sheets("event sheet").Delete
On Error GoTo 0
Application.DisplayAlerts = True
ActiveSheet.Copy after:=Sheets(ActiveSheet.Name)
ActiveSheet.Name = "event sheet"
Range("A1").Sort key1:=Range("B1"), order1:=xlAscending, key2:=Range("A1"), order1:=xlAscending, Header:=xlGuess
Set OutSheet = Sheets("desired format")
With OutSheet
.Cells.ClearContents
.Range("A1").Value = "Person 1"
.Range("B1").Value = "Person 2"
End With
PerRw = 2
OutRw = 2
With Sheets("current format")
Do Until .Cells(PerRw, 1).Value = ""
EvRw = Cells.Find(.Cells(PerRw, 2).Value, , , xlWhole).Row
Do Until Cells(EvRw, 2).Value <> .Cells(PerRw, 2).Value
If Cells(EvRw, 1).Value <> .Cells(PerRw, 1).Value Then
OutSheet.Cells(OutRw, 1).Value = .Cells(PerRw, 1).Value
OutSheet.Cells(OutRw, 2).Value = Cells(EvRw, 1).Value
OutRw = OutRw + 1
End If
EvRw = EvRw + 1
Loop
PerRw = PerRw + 1
Loop
End With
OutSheet.Select
Range("A1").Sort key1:=Range("A1"), order1:=xlAscending, key2:=Range("B1"), order1:=xlAscending, Header:=xlGuess
Range("C1").Value = "Shared Events"
OutRw = 2
Do Until Cells(OutRw, 1).Value = ""
PerRw = OutRw
Do Until Cells(OutRw, 1).Value & Cells(OutRw, 2).Value <> Cells(PerRw, 1).Value & Cells(PerRw, 2).Value
Cells(OutRw, 3).Value = Cells(OutRw, 3).Value + 1
PerRw = PerRw + 1
Loop
If PerRw - 1 > OutRw Then
Rows(OutRw + 1 & ":" & PerRw - 1).Delete
End If
OutRw = OutRw + 1
Loop
End Sub
Bookmarks