(if'in içinde redim'i okumuyor ayrıca vba'da döngüde continue yapamıyorum bu nedenle çok uzun oldu)
Sub deneme()
Dim x As Long
x = Sayfa1.Cells(Rows.Count, "a").End(xlUp).Row
ReDim y(1 To x)
For i = 1 To x
y(i) = Sayfa1.Cells(i, 1)
Next i
k = 0
For i = 1 To x
For j = i + 1 To x
If y(i) = y(j) Then
k = k + 1
Exit For
End If
Next j
Next i
Z = k
ReDim f(Z)
c = 1
For i = 1 To x
For j = i + 1 To x
If y(i) = y(j) Then
f(c) = j
c = c + 1
Exit For
End If
Next j
Next i
t = 1
For i = 1 To x
q = 0
For j = 1 To c - 1
If i = f(j) Then
q = 1
End If
Next j
If q <> 1 Then
Sayfa1.Cells(t, 2) = y(i)
t = t + 1
End If
Next i
End Sub
Sub deneme()
Dim x As Long
x = Sayfa1.Cells(Rows.Count, "a").End(xlUp).Row
ReDim y(1 To x)
For i = 1 To x
y(i) = Sayfa1.Cells(i, 1)
Next i
k = 0
For i = 1 To x
For j = i + 1 To x
If y(i) = y(j) Then
k = k + 1
Exit For
End If
Next j
Next i
Z = k
ReDim f(Z)
c = 1
For i = 1 To x
For j = i + 1 To x
If y(i) = y(j) Then
f(c) = j
c = c + 1
Exit For
End If
Next j
Next i
t = 1
For i = 1 To x
q = 0
For j = 1 To c - 1
If i = f(j) Then
q = 1
End If
Next j
If q <> 1 Then
Sayfa1.Cells(t, 2) = y(i)
t = t + 1
End If
Next i
End Sub