Selecting multiple offset ranges?!?
Posted by Ben on September 28, 2001 9:32 AM
Can some one help me select multiple ranges?
I have a range of cells selected using:
Set LeftCell = cells(ActiveCell.Row, 5)
Set RightCell = cells(ActiveCell.Row, 256)
If IsEmpty(LeftCell) Then Set LeftCell = LeftCell.End(xlToRight)
If IsEmpty(RightCell) Then Set RightCell = RightCell.End(xlToLeft)
If LeftCell.column = 256 And RightCell.column = 1 Then ActiveCell.Select Else Range(LeftCell, RightCell).Select
and I would like to also be able to select cells in the same columns as this would select, but in the first row at the same time.