Home » excel » excel – Copy the range of cells with Ctrl+A

excel – Copy the range of cells with Ctrl+A

Posted by: admin May 14, 2020 Leave a comment

Questions:

Please clarify me what is problem with this copy method?

Range("A6").Activate
Range("A6:"  "UsedRange").Copy
How to&Answers:

You want the range.CurrentRegion property, not worksheet.UsedRange.

Range("A6").CurrentRegion.Copy

CurrentRegion mimics a single ctrl+A on the worksheet. It references a range of cells radiating out from its parent range in all directions until a full blank row, a fully blank column or an edge of the worksheet is met.