Carl Clements
Board Regular
- Joined
- Jun 13, 2008
- Messages
- 95
Hi,
Can anybody help me with some code that will select a range of cells within a row, where the row number or ActiveCell will not always be the same.
In detail I have formulas in columns C:G and I need to select them and copy them down a number of rows, already pre-determined by a variable (CountLODH).
I have the following code that selects the formulas, but then fails on the second line with a Run-time error '1004': Method 'Range' of object'_Global failed
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, CountLODH).Select
Thanks,
Carl
Can anybody help me with some code that will select a range of cells within a row, where the row number or ActiveCell will not always be the same.
In detail I have formulas in columns C:G and I need to select them and copy them down a number of rows, already pre-determined by a variable (CountLODH).
I have the following code that selects the formulas, but then fails on the second line with a Run-time error '1004': Method 'Range' of object'_Global failed
Range(Selection, Selection.End(xlToLeft)).Select
Range(Selection, CountLODH).Select
Thanks,
Carl