I have data on a worksheet that I need to filter in a number of different ways, and then for each filter setting I want to copy the range of visible cells to another worksheet - Consolidated_Data - however despite hours of trying I'm unable to make it do what I want.
I currently use:
to copy unfiltered data between two other sheets, and that works fine so I thought that maybe I could use a similar formula to copy the filtered data, however when I used:
ActiveSheet.Range("E16:DK4000").SpecialCells(xlCellTypeVisible).Copy Destination:=Worksheets("Consolidated_Data").Range("A16")
I got an Error pop-up simply showing 400.
With only 1 line of code it's not hard to know which line is causing the problem, and it's seemingly because of the SpecialCells that I added in, so how do I correctly make it copy and paste the visible data?
Once I get the first block copied and pasted, I then want to reset the filter to a new set of conditions and then copy the new block of visible data to Consolidated_Data immediately below the first block. How do I incorporate this into the coding?