ninja97
ninja97

Reputation: 29

ActiveCell.EntireRow.Copy

I am using ActiveCell.EntireRow.Copy to copy rows that have a certain value in the "E" column cell, to another sheet.

It works great except for one problem. I don't really want to copy the entire row, just the cells from A through N on the given row.

Is there something I can simply subsitute "EntireRow" to in ActiveCell.EntireRow.Copy ?

Upvotes: 0

Views: 1897

Answers (1)

Gary's Student
Gary's Student

Reputation: 96773

How about:

Sub ShortRow()
    Intersect(ActiveCell.EntireRow, Range("A:N")).Copy
End Sub

The intersection picks out the A-N part of the entire row.

Upvotes: 1

Related Questions