Sub jksljk()
Dim lra As Long, lre As Long
Dim rga, rge, ua(), ue(), uboth()
Dim ka As Long, ke As Long, kboth As Long
Dim c, x
Sheets("sheet1").Activate
lra = Range("A" & Rows.Count).End(3).Row - 1
lre = Range("E" & Rows.Count).End(3).Row - 1
rga = Range("A2").Resize(lra)
rge = Range("E2").Resize(lre)
ReDim ua(1 To lra, 1 To 1)
ReDim ue(1 To lre, 1 To 1)
ReDim uboth(1 To lra + lre, 1 To 1)
Application.ScreenUpdating = False
Sheets("sheet2").Activate
With Range("A1").Resize(lra)
.Value = rga
.Sort .Cells(1), 1, Header:=xlNo
x = vbNullString
For Each c In .Cells.Value
If c <> x Then
ka = ka + 1
ua(ka, 1) = c
x = c
End If
Next
End With
Sheets("sheet1").Range("G2").Resize(ka) = ua
Sheets("sheet1").Range("G1") = "Uniques in A"
With Range("E1").Resize(lre)
.Value = rge
.Sort .Cells(1), 1, Header:=xlNo
x = vbNullString
For Each c In .Cells.Value
If c <> x Then
ke = ke + 1
ue(ke, 1) = c
x = c
End If
Next
End With
Sheets("sheet1").Range("H2").Resize(ke) = ue
Sheets("sheet1").Range("H1") = "Uniques in E"
With Range("A1").Resize(lra + ke)
.Cells(lra + 1, 1).Resize(ke).Value = ue
.Sort .Cells(1), 1, Header:=xlNo
x = vbNullString
For Each c In .Cells.Value
If c <> x Then
kboth = kboth + 1
uboth(kboth, 1) = c
x = c
End If
Next
End With
Cells.Resize(, 5).ClearContents
Sheets("sheet1").Range("I2").Resize(kboth) = uboth
Sheets("sheet1").Range("I1") = "Uniques over both"
Sheets("sheet1").Activate
Application.ScreenUpdating = True
End Sub