- Katılım
- 21 Kasım 2016
- Mesajlar
- 43
- Excel Vers. ve Dili
- OFİS 365 TR
- Altın Üyelik Bitiş Tarihi
- 14-12-2021
Sub Eslestir()
Dim S1 As Worksheet, sat As Long, i As Long, c As Range, Adr
Set S1 = Sheets("Sayfa1")
Application.ScreenUpdating = False
S1.Range("A1:I" & Rows.Count).Sort S1.Range("I1")
S1.Range("J1:Z" & Rows.Count).Sort S1.Range("J1")
Sheets("Sayfa2").Select
Range("A1:Z" & Rows.Count).Clear
S1.Range("A:I").Copy Range("A1")
sat = Cells(Rows.Count, "H").End(xlUp).Row
For i = 1 To S1.Cells(Rows.Count, "J").End(xlUp).Row
With S1.Range("I:I")
Set c = .Find(S1.Cells(i, "J"), , xlValues, xlWhole)
If Not c Is Nothing Then
Adr = c.Address
Do
Cells(c.Row, "J") = S1.Cells(i, "J")
S1.Range("K" & i & ":Z" & i).Copy Cells(c.Row, "K")
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> Adr
Else
sat = sat + 1
Cells(sat, "J") = S1.Cells(i, "J")
S1.Range("K" & i & ":Z" & i).Copy Cells(sat, "K")
End If
End With
Next i
End Sub
son 2 haftadır bu kodlardan verimli bir sonuç alamıyorum 2007 excelde bir sorunmu var? kodlarda bir problemmi çözemiyorum... zaten kod yazmayı bilmiyorum kalıp kod kullanıyorum bi el atarsanız sevinirim.
Dim S1 As Worksheet, sat As Long, i As Long, c As Range, Adr
Set S1 = Sheets("Sayfa1")
Application.ScreenUpdating = False
S1.Range("A1:I" & Rows.Count).Sort S1.Range("I1")
S1.Range("J1:Z" & Rows.Count).Sort S1.Range("J1")
Sheets("Sayfa2").Select
Range("A1:Z" & Rows.Count).Clear
S1.Range("A:I").Copy Range("A1")
sat = Cells(Rows.Count, "H").End(xlUp).Row
For i = 1 To S1.Cells(Rows.Count, "J").End(xlUp).Row
With S1.Range("I:I")
Set c = .Find(S1.Cells(i, "J"), , xlValues, xlWhole)
If Not c Is Nothing Then
Adr = c.Address
Do
Cells(c.Row, "J") = S1.Cells(i, "J")
S1.Range("K" & i & ":Z" & i).Copy Cells(c.Row, "K")
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> Adr
Else
sat = sat + 1
Cells(sat, "J") = S1.Cells(i, "J")
S1.Range("K" & i & ":Z" & i).Copy Cells(sat, "K")
End If
End With
Next i
End Sub
son 2 haftadır bu kodlardan verimli bir sonuç alamıyorum 2007 excelde bir sorunmu var? kodlarda bir problemmi çözemiyorum... zaten kod yazmayı bilmiyorum kalıp kod kullanıyorum bi el atarsanız sevinirim.