philfer
03-16-2008, 11:52 AM
Hi,
I am using autofilter in code to get a large list of data to only give me certain information which I copy and paste in different sheets.
However some days one or more of the autofilters may return zero results (depending on the data download)
Is there a way to capture is autofilter returns nothing as I set the range as cell A2 to the lastrow (which I have calculated at the beginning of the code) using xlvisiblecells and if it returns nothing it thinks the rest of the blank sheet is the range.
Is there any way to say if the results are zero then do nothing
I am using autofilter in code to get a large list of data to only give me certain information which I copy and paste in different sheets.
However some days one or more of the autofilters may return zero results (depending on the data download)
Is there a way to capture is autofilter returns nothing as I set the range as cell A2 to the lastrow (which I have calculated at the beginning of the code) using xlvisiblecells and if it returns nothing it thinks the rest of the blank sheet is the range.
Is there any way to say if the results are zero then do nothing