I have written a VBA script to produce a report (a subset of data) from an Excel table. Basically, the VBA script filters the table based on some user selected criteria. It then copies a range of cells (using SpecialCells(xlCellTypeVisible).Copy to ensure only the filtered data is copied). I am trying to then paste this into a new location. The new location already contains some data so I am using PasteSpecial (xlPasteValues), SkipBlanks:=True so that only cells containing data are pasted and blank cells are not.
However, Excel is taking no notice of the "skipblanks" command, or perhaps it's just not recognising the blank cells as blank cells as it just pastes everything, blank cells included.
I've tried the exact same thing using data copied normally (eg selection.copy) from the unfiltered table and it works perfectly, so the problem seems to be related to the fact that it is copied from a filtered table.
Has anyone experienced this issue and, if so, is there a simple solution?
TIA
Mike
Bookmarks