Excel VBA filtering and copy pasting data
excel, vba
Solution
Use `Offset` method like this:
ActiveSheet.Range("A1:AR1617").Offset(1, 0).SpecialCells(xlCellTypeVisible).Copy
Above code copies the filtered data excluding the header. Is this what you're trying?
Problem
Given a data set, that is lets say 10 columns. In column A i have date and in column B i have %. I want to filter for column A only 2014 data and for column B <70% and copy paste the filtered data into another worksheet. How do i go about writing the code for the next line to get to the first row of filtered data? ``` ActiveSheet.Range("$A$1:$AR$1617").AutoFilter Field:=5, Operator:= _ xlFilterValues, Criteria2:=Array(0, "12/28/2014") ActiveSheet.Range("$A$1:$AR$1617").AutoFilter Field:=14, Criteria1:="<0.7" _ , Operator:=xlAnd ```