Hi,
I have a sheet of data that has the Autofilter applied and I want to get a
column of filtered data and transfer it to another sheet. The code below
works most of the time but when I try to grab a range of data and the
filtered sheet does not show any data (because I have filtered using a
criteria that does not match any data in the column under consideration - I
can't change this unfortunately) I get an Error 1004 "Cells were not found"
and the routine crashes out.
> ' Code applies autofiltering based on user entered criteria before this
> section
>
> ' Copy Task Numbers
> Set rng1 = Worksheets("FEPivot").Range("K6:K500")
> Set rng1 = rng1.SpecialCells(xlVisible)
> rng1.Copy Destination:=Worksheets("StatusSummary").Range("A29")
>
> ' Code continues...
What I want to do is if the range selected does not contain any cells with
data in just have the code step over these lines onto the next set of
scripts. Is the an approach that will allow me to do this?
Regards
Chris
Bookmarks