DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
[FONT="Trebuchet MS"]DefInt A, C, I, S
Sub Emre()
Dim dizi()
For i = 2 To Range("A65536").End(3).Row
If WorksheetFunction.CountIf(Range("A2:A" & i), Cells(i, "A")) > 1 Then
ReDim Preserve dizi(a)
dizi(a) = Cells(i, "A")
a = a + 1
End If
Next i
On Error GoTo hata
For c = Range("A65536").End(3).Row To 2 Step -1
For s = LBound(dizi) To UBound(dizi)
If Cells(c, 1) = dizi(s) Then
Rows(c).Delete
End If
Next s
Next c
hata: MsgBox "Benzer veri bulunamadı.", vbInformation, "Uyarı"
End Sub[/FONT]
=EĞER(EĞERSAY(B$1:B2;B2)=1;MAK(A$1:A1)+1;"")
=EĞER(MAK(A$1:A$100)<SATIR(1:1);"";DÜŞEYARA(SATIR(1:1);A$1:B$100;2))
[FONT="Trebuchet MS"]Sub Emre()
Dim Rky As Object, Evn As Object, i%
Application.ScreenUpdating = False
Set Rky = CreateObject("adodb.connection")
Rky.Open "provider=microsoft.[COLOR="Red"]ace[/COLOR].oledb.[COLOR="red"]12.0[/COLOR];data source = " & _
[COLOR="Red"]ThisWorkbook.FullName[/COLOR] & ";extended properties = ""excel [COLOR="red"]12[/COLOR].0;hdr=[COLOR="red"]no[/COLOR]"""
Set Evn = Rky.Execute("select [COLOR="Red"]f1[/COLOR] from [[COLOR="red"]Sayfa1[/COLOR]$] group by [COLOR="red"]f1 [/COLOR][COLOR="red"]HAVING COUNT(f1)>1[/COLOR]")
Do While Not Evn.EOF
Rky.Execute "[COLOR="red"]update [/COLOR][[COLOR="red"]Sayfa1[/COLOR]$] set [COLOR="red"]f1[/COLOR]='[COLOR="red"]10[/COLOR]' where [COLOR="red"]f1[/COLOR]=" & [COLOR="red"]Evn(0).Value[/COLOR] & ""
Evn.MoveNext
Loop
Evn.Close: Rky.Close
For i = Range("A65536").End(3).Row To 2 Step -1
If Cells(i, 1).Value = [COLOR="red"]10 [/COLOR]Then Rows(i).Delete
Next i
Application.ScreenUpdating = True
i = Empty: Set Evn = Nothing: Set Rky = Nothing
End Sub[/FONT]