thy this code,
I have assumed the entries are in columns A and B and the results is pasted into columns F and G
Sub movedata()
lastrow = Cells(Rows.Count, 1).End(xlUp).Row
inarr = Range(Cells(2, 1), Cells(lastrow, 2))
Range(Cells(2, 6), Cells(lastrow, 7)) = ""
outarr = Range(Cells(2, 6), Cells(lastrow, 7))
For i = 1 To lastrow - 1
If inarr(i, 2) = "A" Then
outarr(i, 1) = inarr(i, 1)
outarr(i, 2) = inarr(i, 2)
' find all the other entries of this cow
For j = 1 To lastrow - 1
If i <> j Then
If inarr(i, 1) = inarr(j, 1) Then
outarr(j, 1) = inarr(j, 1)
outarr(j, 2) = inarr(j, 2)
End If
End If
Next j
End If
Next i
Range(Cells(2, 6), Cells(lastrow, 7)) = outarr
End Sub