Autofilter Error

sumit madaan

New Member
Joined
Sep 1, 2011
Messages
15
Hi,

Can u help me, when i run below code (Selection.AutoFilter) show error and i am not able to debug this code.How can i run this


Sub data()
'
' data Macro
'
'
Selection.AutoFilter
Range("N1").Select
ActiveSheet.Range("$A$1:$AD$11221").AutoFilter Field:=14, Criteria1:= _
"Desktop"
Range("R3").Select
ActiveCell.FormulaR1C1 = "=RC[-1]"
Range("R3").Select
Selection.Copy
Range("Q3").Select
Selection.End(xlDown).Select
Range("R11220").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("Q11220").Select
Selection.End(xlUp).Select
Range("R3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.FillDown
Range("AD3").Select
ActiveCell.FormulaR1C1 = "=RC[-9]"
Range("AC3").Select
Selection.End(xlDown).Select
Range("AD11220").Select
Range(Selection, Selection.End(xlUp)).Select
Range("AD3:AD11220").Select
Range("AD11220").Activate
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.FillDown
Range("AD11219").Select
Selection.End(xlUp).Select
Range("N1").Select
ActiveSheet.Range("$A$1:$AD$11221").AutoFilter Field:=14, Criteria1:="LCIA"
Range("S2").Select
ActiveCell.FormulaR1C1 = "=RC[-2]"
Range("Q2").Select
Selection.End(xlDown).Select
Range("S11209").Select
Range(Selection, Selection.End(xlUp)).Select
Range("S2:S11209").Select
Range("S11209").Activate
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.FillDown
Range("Q11199").Select
Selection.End(xlUp).Select
Range("N1").Select
ActiveSheet.Range("$A$1:$AD$11221").AutoFilter Field:=14
Range("O1").Select
ActiveSheet.Range("$A$1:$AD$11221").AutoFilter Field:=15, Criteria1:=Array( _
"C2D", "C2Q", "Core i3", "Core i3 SNB", "Core i5", "Core i5 SNB", "Core i7", _
"Core i7 SNB"), Operator:=xlFilterValues
Range("T3").Select
ActiveCell.FormulaR1C1 = "=RC[-3]"
Range("T3").Select
Selection.Copy
Range("U3").Select
Selection.End(xlDown).Select
Range("T11219").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("U11219").Select
Selection.End(xlUp).Select
Range("T3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.FillDown
Range("T1").Select
Selection.AutoFilter
Range("T1").Select
Selection.End(xlToLeft).Select
Range("A1:AD11221").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select
ActiveSheet.Previous.Select
ActiveSheet.Next.Select
ActiveSheet.Previous.Select
End Sub
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,224,534
Messages
6,179,390
Members
452,909
Latest member
VickiS

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top