View Single Post
 
Old 10-24-2015, 08:31 PM
Sandhya Sandhya is offline Windows 7 32bit Office 2007
Novice
 
Join Date: Nov 2014
Posts: 21
Sandhya is on a distinguished road
Arrow Extract the filter data

Hi,

I am using below code to extract the filter data, but it is giving probolem.
can any one help me to resolve the same.
Code:
Private Sub CommandButton1_Click()
Sheet1.Activate
Sheet1.Range("A1,G1").Select
Selection.Copy
Sheets("Sheet4").Select
Range("A1:B1").PasteSpecial
Columns("A:A").EntireColumn.AutoFit
Columns("B:B").EntireColumn.AutoFit
Range("C4").Select
Sheets("Sheet1").Select
Application.CutCopyMode = False
Sheet1.Range("A3").Select
Sheets("Sheet4").Select
Sheets("Sheet1").Range("A1:G9").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Sheets("Sheet1").Range("I1:I2"), CopyToRange:=Sheets("Sheet4").Range("A1:B1"), Unique:=False
End Sub
Attached Files
File Type: xlsx Book1.xlsx (16.3 KB, 10 views)

Last edited by macropod; 10-25-2015 at 06:19 PM. Reason: Added code tags
Reply With Quote