• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1245
  • Last Modified:

Select the next 1000 rows down and copy to clipboard

In vba, how do I copy down the next 1000 cells down from the active cell, into the clipboard?  When I use the recorder it uses absolute values and I need relative values.  Is there a setting in vba to tell it to use relative values instead of absolute? or is this something I just need to remember?
1 Solution
Glenn RayExcel VBA DeveloperCommented:
You can record with relative references instead of absolute:
record relative references...but it might not really work in this case.  This setting is better for replicating formulas/functions.

The better VBA code for this instance would be this:
Sub Copy_1000()
    Range(ActiveCell, ActiveCell.Offset(999, 0)).Copy
End Sub

Open in new window

Note that I'm offsetting 999 rows because I'm including the current row.

RWayneHAuthor Commented:
Thanks for the help.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now