- Katılım
- 2 Kasım 2019
- Mesajlar
- 71
- Excel Vers. ve Dili
- Excel 2016
Merhabalar, otomatik filtre yaptığım bir makro var, makro bitince A2 hücresinde yazan sayıyı buton ile değiştirip makroyu tekrar başlatıyorum.
Size sormak istediğim bu değeri makro ile sıraya göre değiştirmek mümkün mü?
Örnek olarak makrom çalıştı ve bitti ben A2 hücresinde yazan sayıyı ( 12 olsun) 13 yapıp makroyu tekrar başlatıyorum, bunu makro ile istediğim aralıkta yapmak mümkün olurmu ?
Size sormak istediğim bu değeri makro ile sıraya göre değiştirmek mümkün mü?
Örnek olarak makrom çalıştı ve bitti ben A2 hücresinde yazan sayıyı ( 12 olsun) 13 yapıp makroyu tekrar başlatıyorum, bunu makro ile istediğim aralıkta yapmak mümkün olurmu ?
Kod:
Range("BL1").Select
Selection.Copy
Range("AW2").Select
ActiveSheet.Paste
d = Array(Format(Range("W2"), "0%"), Format(Range("W2") + 0.01, "0%"), Format(Range("W2") - 0.01, "0%"), Format(Range("W2") + 0.02, "0%"), Format(Range("W2") + 0.03, "0%"), Format(Range("W2") + 0.04, "0%"), Format(Range("W2") + 0.05, "0%"), Format(Range("W2") - 0.02, "0%"), Format(Range("W2") - 0.03, "0%"), Format(Range("W2") - 0.04, "0%"), Format(Range("W2") - 0.05, "0%"))
Range("W2").Select
ActiveSheet.Range("$A$1:$BH$14488").AutoFilter Field:=23, Criteria1:=d, Operator:=xlFilterValues
d = Array(Format(Range("X2"), "0%"), Format(Range("X2") + 0.01, "0%"), Format(Range("X2") - 0.01, "0%"), Format(Range("X2") + 0.02, "0%"), Format(Range("X2") + 0.03, "0%"), Format(Range("X2") + 0.04, "0%"), Format(Range("X2") + 0.05, "0%"), Format(Range("X2") - 0.02, "0%"), Format(Range("X2") - 0.03, "0%"), Format(Range("X2") - 0.04, "0%"), Format(Range("X2") - 0.05, "0%"))
Range("X2").Select
ActiveSheet.Range("$A$1:$BH$14488").AutoFilter Field:=24, Criteria1:=d, Operator:=xlFilterValues
d = Array(Format(Range("Y2"), "0%"), Format(Range("Y2") + 0.01, "0%"), Format(Range("Y2") - 0.01, "0%"), Format(Range("Y2") + 0.02, "0%"), Format(Range("Y2") + 0.03, "0%"), Format(Range("Y2") + 0.04, "0%"), Format(Range("Y2") + 0.05, "0%"), Format(Range("Y2") - 0.02, "0%"), Format(Range("Y2") - 0.03, "0%"), Format(Range("Y2") - 0.04, "0%"), Format(Range("Y2") - 0.05, "0%"))
Range("Y2").Select
ActiveSheet.Range("$A$1:$BH$14488").AutoFilter Field:=25, Criteria1:=d, Operator:=xlFilterValues
Range("D2").Select
ActiveSheet.Range("$A$1:$BH$14488").AutoFilter Field:=4, Criteria1:=Range("D2")
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets("KAYIT").Select
Range("A1").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
'-----------------
ActiveSheet.Paste
Application.CutCopyMode = False
Sheets("ARŞİV").Select
ActiveSheet.ShowAllData
Range("AI2").Select
Range("BM1").Select
Application.CutCopyMode = False
Selection.Copy
Range("AW2").Select
ActiveSheet.Paste
d = Array(Format(Range("AA2"), "0%"), Format(Range("AA2") + 0.01, "0%"), Format(Range("AA2") - 0.01, "0%"), Format(Range("AA2") + 0.02, "0%"), Format(Range("AA2") + 0.03, "0%"), Format(Range("AA2") + 0.04, "0%"), Format(Range("AA2") + 0.05, "0%"), Format(Range("AA2") - 0.02, "0%"), Format(Range("AA2") - 0.03, "0%"), Format(Range("AA2") - 0.04, "0%"), Format(Range("AA2") - 0.05, "0%"))
Range("AA2").Select
ActiveSheet.Range("$A$1:$BH$14488").AutoFilter Field:=27, Criteria1:=d, Operator:=xlFilterValues
d = Array(Format(Range("AC2"), "0%"), Format(Range("AC2") + 0.01, "0%"), Format(Range("AC2") - 0.01, "0%"), Format(Range("AC2") + 0.02, "0%"), Format(Range("AC2") + 0.03, "0%"), Format(Range("AC2") + 0.04, "0%"), Format(Range("AC2") + 0.05, "0%"), Format(Range("AC2") - 0.02, "0%"), Format(Range("AC2") - 0.03, "0%"), Format(Range("AC2") - 0.04, "0%"), Format(Range("AC2") - 0.05, "0%"))
Range("AC2").Select
ActiveSheet.Range("$A$1:$BH$14488").AutoFilter Field:=29, Criteria1:=d, Operator:=xlFilterValues
d = Array(Format(Range("AB2"), "0%"), Format(Range("AB2") + 0.01, "0%"), Format(Range("AB2") - 0.01, "0%"), Format(Range("AB2") + 0.02, "0%"), Format(Range("AB2") + 0.03, "0%"), Format(Range("AB2") + 0.04, "0%"), Format(Range("AB2") + 0.05, "0%"), Format(Range("AB2") - 0.02, "0%"), Format(Range("AB2") - 0.03, "0%"), Format(Range("AB2") - 0.04, "0%"), Format(Range("AB2") - 0.05, "0%"))
Range("AB2").Select
ActiveSheet.Range("$A$1:$BH$14488").AutoFilter Field:=28, Criteria1:=d, Operator:=xlFilterValues
Range("D2").Select
ActiveSheet.Range("$A$1:$BH$14488").AutoFilter Field:=4, Criteria1:=Range("D2")
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets("KAYIT").Select
Range("A1").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
'-----------------
ActiveSheet.Paste
Application.CutCopyMode = False
Sheets("ARŞİV").Select
ActiveSheet.ShowAllData
Range("AI2").Select
Range("BM1").Select
Application.CutCopyMode = False
Selection.Copy
Range("AW2").Select
ActiveSheet.Paste
Sheets("ARŞİV").Select
Range("D2").Select
ActiveSheet.Range("$A$1:$BH$14488").AutoFilter Field:=4, Criteria1:=Range("D2")
d = Array(Format(Range("W2"), "0%"), Format(Range("W2") + 0.01, "0%"), Format(Range("W2") - 0.01, "0%"), Format(Range("W2") + 0.02, "0%"), Format(Range("W2") + 0.03, "0%"), Format(Range("W2") + 0.04, "0%"), Format(Range("W2") + 0.05, "0%"), Format(Range("W2") - 0.06, "0%"), Format(Range("W2") - 0.02, "0%"), Format(Range("W2") - 0.03, "0%"), Format(Range("W2") - 0.04, "0%"), Format(Range("W2") - 0.05, "0%"), Format(Range("W2") + 0.06, "0%"), Format(Range("W2") + 0.07, "0%"), Format(Range("W2") - 0.07, "0%"))
Range("W2").Select
ActiveSheet.Range("$A$1:$BH$14488").AutoFilter Field:=23, Criteria1:=d, Operator:=xlFilterValues
d = Array(Format(Range("X2"), "0%"), Format(Range("X2") + 0.01, "0%"), Format(Range("X2") - 0.01, "0%"), Format(Range("X2") + 0.02, "0%"), Format(Range("X2") + 0.03, "0%"), Format(Range("X2") + 0.04, "0%"), Format(Range("X2") + 0.05, "0%"), Format(Range("X2") - 0.06, "0%"), Format(Range("X2") - 0.02, "0%"), Format(Range("X2") - 0.03, "0%"), Format(Range("X2") - 0.04, "0%"), Format(Range("X2") - 0.05, "0%"), Format(Range("X2") + 0.06, "0%"), Format(Range("X2") + 0.07, "0%"), Format(Range("X2") - 0.07, "0%"))
Range("X2").Select
ActiveSheet.Range("$A$1:$BH$14488").AutoFilter Field:=24, Criteria1:=d, Operator:=xlFilterValues
d = Array(Format(Range("Y2"), "0%"), Format(Range("Y2") + 0.01, "0%"), Format(Range("Y2") - 0.01, "0%"), Format(Range("Y2") + 0.02, "0%"), Format(Range("Y2") + 0.03, "0%"), Format(Range("Y2") + 0.04, "0%"), Format(Range("Y2") + 0.05, "0%"), Format(Range("Y2") - 0.06, "0%"), Format(Range("Y2") - 0.02, "0%"), Format(Range("Y2") - 0.03, "0%"), Format(Range("Y2") - 0.04, "0%"), Format(Range("Y2") - 0.05, "0%"), Format(Range("Y2") + 0.06, "0%"), Format(Range("Y2") + 0.07, "0%"), Format(Range("Y2") - 0.07, "0%"))
Range("Y2").Select
ActiveSheet.Range("$A$1:$BH$14488").AutoFilter Field:=25, Criteria1:=d, Operator:=xlFilterValues
d = Array(Format(Range("AA2"), "0%"), Format(Range("AA2") + 0.01, "0%"), Format(Range("AA2") - 0.01, "0%"), Format(Range("AA2") + 0.02, "0%"), Format(Range("AA2") + 0.03, "0%"), Format(Range("AA2") + 0.04, "0%"), Format(Range("AA2") + 0.05, "0%"), Format(Range("AA2") - 0.02, "0%"), Format(Range("AA2") - 0.03, "0%"), Format(Range("AA2") - 0.04, "0%"), Format(Range("AA2") - 0.05, "0%"), Format(Range("AA2") - 0.06, "0%"), Format(Range("AA2") + 0.06, "0%"), Format(Range("AA2") + 0.07, "0%"), Format(Range("AA2") - 0.07, "0%"))
Range("AA2").Select
ActiveSheet.Range("$A$1:$BH$14488").AutoFilter Field:=27, Criteria1:=d, Operator:=xlFilterValues
d = Array(Format(Range("AC2"), "0%"), Format(Range("AC2") + 0.01, "0%"), Format(Range("AC2") - 0.01, "0%"), Format(Range("AC2") + 0.02, "0%"), Format(Range("AC2") + 0.03, "0%"), Format(Range("AC2") + 0.04, "0%"), Format(Range("AC2") + 0.05, "0%"), Format(Range("AC2") - 0.02, "0%"), Format(Range("AC2") - 0.03, "0%"), Format(Range("AC2") - 0.04, "0%"), Format(Range("AC2") - 0.05, "0%"), Format(Range("AC2") - 0.06, "0%"), Format(Range("AC2") + 0.06, "0%"), Format(Range("AC2") + 0.07, "0%"), Format(Range("AC2") - 0.07, "0%"))
Range("AC2").Select
ActiveSheet.Range("$A$1:$BH$14488").AutoFilter Field:=29, Criteria1:=d, Operator:=xlFilterValues
d = Array(Format(Range("AB2"), "0%"), Format(Range("AB2") + 0.01, "0%"), Format(Range("AB2") - 0.01, "0%"), Format(Range("AB2") + 0.02, "0%"), Format(Range("AB2") + 0.03, "0%"), Format(Range("AB2") + 0.04, "0%"), Format(Range("AB2") + 0.05, "0%"), Format(Range("AB2") - 0.02, "0%"), Format(Range("AB2") - 0.03, "0%"), Format(Range("AB2") - 0.04, "0%"), Format(Range("AB2") - 0.05, "0%"), Format(Range("AB2") - 0.06, "0%"), Format(Range("AB2") + 0.06, "0%"), Format(Range("AB2") + 0.07, "0%"), Format(Range("AB2") - 0.07, "0%"))
Range("AB2").Select
ActiveSheet.Range("$A$1:$BH$14488").AutoFilter Field:=28, Criteria1:=d, Operator:=xlFilterValues
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets("KAYIT").Select
Range("A1").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
'-----------------
ActiveSheet.Paste
Application.CutCopyMode = False
Sheets("KAYIT").Select