Mohammad Ishaq
Member
Hello Guys,
I have an excel file having two sheets.First sheet is for main data entry and the second sheet is for advance filter.
I want to use advance filter to transfer data to the second sheet through a command button on the second sheet.
For this purpose i have write a macro which is given below.
But when i run the micro , it gives me an error.I can't understand how to solve this problem.My file is in attachment .Please help me to solve my problem
Thanks to everyone
I have an excel file having two sheets.First sheet is for main data entry and the second sheet is for advance filter.
I want to use advance filter to transfer data to the second sheet through a command button on the second sheet.
For this purpose i have write a macro which is given below.
Code:
Option Explicit
Sub Filter_Transportation()
Sheets("Transportation").Range("C8").CurrentRegion.AdvancedFilter _
Action:=xlFilterCopy, _
CriteriaRange:=Sheets("Advance Filter").Range("C6:C7"), _
CopyToRange:=Sheets("Advance Filter").Range("F6:W6") _
, Unique:=False
End Sub
But when i run the micro , it gives me an error.I can't understand how to solve this problem.My file is in attachment .Please help me to solve my problem
Thanks to everyone