DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub CommandButton1_Click()
Dim S1 As Worksheet, S2 As Worksheet, Aranan As Variant
Dim BUL As Range, ADRES As String, Boş_Satır As Long
Application.ScreenUpdating = False
Set S1 = Sheets("Sayfa1")
Set S2 = Sheets("Sayfa2")
Aranan = S1.Range("H2")
S2.Range("A:G").ClearContents
Set BUL = S1.Range("A:G").Find(Aranan, , , xlPart)
If Not BUL Is Nothing Then
ADRES = BUL.Address
Do
If BUL.Row <> Satır Then
Boş_Satır = S2.Cells(Rows.Count, 1).End(3).Row + 1
S2.Range("A" & Boş_Satır & ":G" & Boş_Satır).Value = S1.Range("A" & BUL.Row & ":G" & BUL.Row).Value
End If
Satır = BUL.Row
Set BUL = S1.Range("A:G").FindNext(BUL)
Loop While Not BUL Is Nothing And BUL.Address <> ADRES
End If
Set BUL = Nothing
Set S1 = Nothing
Set S2 = Nothing
Application.ScreenUpdating = True
If Boş_Satır = 0 Then
MsgBox "Aranan kayıt bulunamadı !", vbCritical
Else
MsgBox "Arama işlemi tamamlanmıştır." & Chr(10) & Chr(10) & _
"Toplam " & Boş_Satır - 1 & " adet kayıt bulunmuştur.", vbInformation
End If
End Sub