AdvancedFilter Action:=xlFilterCopy : AdvancedFilter « Excel « VBA / Excel / Access / Word






AdvancedFilter Action:=xlFilterCopy

 
Sub AllColumnsOneCustomer()
    Dim IRange As range
    Dim ORange As range
    Dim CRange As range

    Set CRange = cells(1, 1).resize(2, 1)
    Set ORange = cells(1, 3)
    Set IRange = range("A1").resize(FinalRow, 1)
    IRange.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=CRange, CopyToRange:=ORange
End Sub

 








Related examples in the same category

1.Advanced Filter Demo
2.Do the Advanced Filter