DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Function Sayfa_Kontrol(Sayfa_Adı As String) As Boolean
On Error Resume Next
Sayfa_Kontrol = CBool(Len(Worksheets(Sayfa_Adı).Name) > 0)
End Function
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim Satır As Long, Bul As Range, Adres As String, SG As Worksheet
Set SG = Sheets("GENEL")
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
If Target.Row < 2 Then Exit Sub
Cancel = True
If Target <> "" Then
If Sayfa_Kontrol(Target.Text) = True Then
With Sheets(CStr(Target))
.Select
Set Bul = SG.Cells.Find(Target, , , xlWhole)
If Not Bul Is Nothing Then
Adres = Bul.Address
Do
If WorksheetFunction.CountIf(.Range("C:C"), SG.Cells(Bul.Row, "C")) = 0 Then
Satır = .Cells(Rows.Count, 1).End(3).Row + 1
.Range("A" & Satır & ":K" & Satır).Value = SG.Range("A" & Bul.Row & ":K" & Bul.Row).Value
End If
Set Bul = SG.Cells.FindNext(Bul)
Loop While Not Bul Is Nothing And Bul.Address <> Adres
End If
End With
MsgBox "Aktarım işlemi tamamlanmıştır.", vbInformation
Else
Set Yeni_Sayfa = Sheets.Add
With ActiveSheet
.Move After:=Sheets(Worksheets.Count)
.Name = Target
.Range("A1:K1").Value = SG.Range("A1:K1").Value
.Range("A1:J1").HorizontalAlignment = xlCenter
.Range("A1:J1").Font.Bold = True
Set Bul = SG.Cells.Find(Target, , , xlWhole)
If Not Bul Is Nothing Then
Adres = Bul.Address
Do
If WorksheetFunction.CountIf(.Range("C:C"), SG.Cells(Bul.Row, "C")) = 0 Then
Satır = .Cells(Rows.Count, 1).End(3).Row + 1
.Range("A" & Satır & ":K" & Satır).Value = SG.Range("A" & Bul.Row & ":K" & Bul.Row).Value
End If
Set Bul = SG.Cells.FindNext(Bul)
Loop While Not Bul Is Nothing And Bul.Address <> Adres
End If
.Cells.EntireColumn.AutoFit
End With
MsgBox "Aktarım işlemi tamamlanmıştır.", vbInformation
End If
End If
Set Bul = Nothing
Set SG = Nothing
End Sub
Merhaba,
Aşağıdaki kodlar Süzülmüş olan veriyi ilgili sayfaya aktarır.
Umarım işinize yarar.
Kod:Sub Suz_ve_Aktar() Dim SonSat As Long, _ Olcut As String, _ s2 As Worksheet Sheets("GENEL").Select With Sheets("GENEL") If .AutoFilterMode Then With .AutoFilter.Filters(1) [COLOR="Red"] If .On Then Olcut = .Criteria1[/COLOR] End With End If End With If Olcut = "" Then Exit Sub Olcut = Replace(Olcut, "=", "") If Not SayfaVarMi(Olcut) Then Sheets.Add After:=Worksheets(Worksheets.Count) ActiveSheet.Name = Olcut Sheets("GENEL").Select End If Range("A1").Activate Set s2 = Sheets(Olcut) On Error Resume Next SonSat = s2.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row + 1 If SonSat = 0 Then SonSat = 1 Range("A1").CurrentRegion.Copy s2.Range("A" & SonSat) If SonSat > 1 Then s2.Rows(SonSat).Delete MsgBox "İşlem Tamam..." End Sub
Kod:Function SayfaVarMi(SayfaAdi As String) As Boolean On Error Resume Next SayfaVarMi = CBool(Len(Worksheets(SayfaAdi).Name) > 0) End Function