Sub ExcelceFiltreleYazdir()
Dim Mahalle As Collection
Dim Aralik As Range
Dim Ara As Range
Dim bulunan As Variant
Set Sayfam = ThisWorkbook.ActiveSheet
Set Aralik = Range("A1", ActiveSheet.Range("A65530").End(3))
Set Mahalle = New Collection
On Error Resume Next
For Each Ara In Aralik.Cells
Mahalle.Add Ara.Value
Next Ara
On Error GoTo 0
For Each bulunan In Mahalle
ActiveSheet.Range("$A$1:$Y$10000").AutoFilter Field:=2, Criteria1:=bulunan
ActiveSheet.PrintOut
Next bulunan
ActiveSheet.Range("$A$1:$Y$10000").AutoFilter Field:=2
MsgBox "Sayfalar yazıcıya gönderildi.", vbInformation, "ExcelSitesi.com"
End Sub
Ek:
- Grupla • 10 kB • 389 kez indirildi
Okunma: 176