Thursday, January 16, 2014

VBA - Copy all Visible Cells in a Range

Quick snippet to copy all visible cells in a given range. Useful when filtering data and wanting to only move the visible data:


myrange = "A1:B2"

Range(myrange).SpecialCells(xlCellTypeVisible).Copy

No comments:

Post a Comment