Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Range Function 1

Status
Not open for further replies.

Bass71

MIS
Jun 21, 2001
79
I am trying to select a range using the RC functionality.

The following code works:

Range ("A1:p1").Select

But this Does Not...

Range ("RC[1]:RC[16]").Select

How can I select a range without specifying the alpha-numeric coordinates?
 
There areseveral ways I know to do this. It would depend on how the data is arranged on the spreadsheet. I think what might work is something like this:
Range(ActiveCell, ActiveCell.End(xlToRight)).Select
This would select a region from the active cell to the end of the data heading to the right. It is the equivalent of high lighting from the active cell using <cntrl> <shift>rt. arrow.

You could also use the offset method:
Range(ActiveCell, ActiveCell.Offset(, 5)).Select

This would select a total of 6 cells, the active cell + 5.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top