- Katılım
- 17 Aralık 2008
- Mesajlar
- 780
- Excel Vers. ve Dili
- Microsoft 365
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub Eski()
Dim Dic, Veri
Veri = Range("A2:B" & Range("A2").End(xlDown).Row).Value
ReDim Liste(1 To UBound(Veri), 1 To 1)
Set Dic = CreateObject("Scripting.Dictionary")
For i = 1 To UBound(Veri)
If Not Dic.Exists(Veri(i, 2)) Then
Dic.Add Veri(i, 2), i & "-x"
ElseIf Veri(i, 1) < Veri(Split(Dic(Veri(i, 2)), "-")(0), 1) Then
Dic(Veri(i, 2)) = i & "-z"
End If
Next i
For i = 1 To UBound(Veri)
If i & "-z" = Dic(Veri(i, 2)) Then Liste(i, 1) = "ESKİ"
Next i
Range("C2").Resize(UBound(Veri), 1) = Liste
End Sub
=EĞER(VE(EĞERSAY($B$2:$B$7;B2)>1;A2=MİN(EĞER($B$2:$B$7=B2;$A$2:$A$7;"")));"ESKİ";"")
=EĞER(VE(EĞERSAY($B$2:$B$7;B2)>1;A2<MAK(EĞER($B$2:$B$7=B2;$A$2:$A$7;"")));"ESKİ";"")
Sub Eski2()
Dim Dic, Veri
Veri = Range("A2:B" & Range("A2").End(xlDown).Row).Value
ReDim Liste(1 To UBound(Veri), 1 To 1)
Set Dic = CreateObject("Scripting.Dictionary")
For i = 1 To UBound(Veri)
If Not Dic.Exists(Veri(i, 2)) Then
Dic.Add Veri(i, 2), Veri(i, 1)
ElseIf Veri(i, 1) > Dic(Veri(i, 2)) Then
Dic(Veri(i, 2)) = Veri(i, 1)
End If
Next i
For i = 1 To UBound(Veri)
If Veri(i, 1) < Dic(Veri(i, 2)) Then Liste(i, 1) = "ESKİ"
Next i
Range("C2").Resize(UBound(Veri), 1) = Liste
End Sub