Select a range of celss relative to a single cell
Select a range of celss relative to a single cell
(OP)
I would like to use a function similar to offset, that will be able to refer to a range of cells, in a relative position to a single cell. The offset function itself does not allow reference to the destination range being different size to the original.
eg, the current range is A1, I want to be able to make the range B1:D1, and then merge these cells. I would like to do this without using range.select calls if possible.
Any ideas?
eg, the current range is A1, I want to be able to make the range B1:D1, and then merge these cells. I would like to do this without using range.select calls if possible.
Any ideas?
RE: Select a range of celss relative to a single cell
ActiveSheet.Range("A1").Offset(0, 1).Resize(1, 3)
First you use Offset to move the range to the starting cell, then you use Resize to change the extent of the range.
If by "merge these cells" you mean you really want to merge them just add ".Merge" to the end of the expression.
Rick Sprague