Relative Values in a Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do you select a range of cells with relative value instead of absolute values in a macro?
 
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?
 
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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top