Relative Values in a Macro

D

DGernand

How do you select a range of cells with relative value instead of absolute values in a macro?
 
R

Rob van Gelder

This will select the cell in the next column:
Range("A1").Offset(0, 1).Select

This will select a region the same size as B5:G15 but offset 20 rows down.
Range("B5:G15").Offset(20, 0).Select



--
Rob van Gelder - http://www.vangelder.co.nz/excel


DGernand said:
How do you select a range of cells with relative value instead of absolute
values in a macro?
 
G

Grey Newt

If it helps - when you record a macro you can choose (using the small toolbar that appears during recording) to alter the selection from relative to absolute. you can then copy the recorded code into your procedure...
 
Top