-
code optimization
Hello., could you help me optimized my below code?
I want to copy a few data from one sheet to other and then print them.
How can I print active cell's? (the scope is changing)
Range("e5").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC3&RC1,plan_zmianowy!C2:C5,2,0)"
Selection.AutoFill Destination:=Range("E5:E303")
Range("E5:E303").Select
Range("I5").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC3&RC1,plan_zmianowy!C2:C5,3,0)"
Selection.AutoFill Destination:=Range("I5:I303")
Range("I5:I303").Select
Range("M5").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC3&RC1,plan_zmianowy!C2:C5,4,0)"
Selection.AutoFill Destination:=Range("M5:M303")
Range("M5:M303").Select
Range("B1").Select
ActiveCell.FormulaR1C1 = "=PLAN!R[1]C[42]"
Range("B2").Select
Range("A1").Select
ActiveSheet.Range("$A$4:$Y$303").AutoFilter Field:=25, Criteria1:=">0"
Columns("Y:Y").Select
Selection.EntireColumn.Hidden = True
Range("A1").Select
Any help on getting this to work would be most appreciated!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules