How do I select certain cells within a row?

  • Thread starter Thread starter CW
  • Start date Start date
C

CW

Hello,

I have this command that selects the current row:

ActiveCell.EntireRow.Select

....but I just want to select the first 4 cells in the row, for
instance:

Range("A1:D1").Select

.... now say I'm using the command within a loop, so I can't reference
a specific Range. How can I tell the macro to just select the first 4
cells in the current row?

Thanks for any help!
 
Hello,

I have this command that selects the current row:

ActiveCell.EntireRow.Select

...but I just want to select the first 4 cells in the row, for
instance:

Range("A1:D1").Select

... now say I'm using the command within a loop, so I can't reference
a specific Range. How can I tell the macro to just select the first 4
cells in the current row?

Thanks for any help!

This should work:

With ActiveCell.EntireRow
.Range(.Cells(1, 1), .Cells(1, 4)).Select
End With
 
Back
Top