ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Relative references to multiple selections (https://www.excelbanter.com/excel-programming/273330-relative-references-multiple-selections.html)

Bill[_16_]

Relative references to multiple selections
 
Lisa,

I am unsure what you are asking exactly about the offset.
But you can shift your current selection using offset, for
example, if range "A1:C10" is currently selected you can
shift or move your current selection to "F6:H15" using the
following:

Selection.Offset(5, 5).Select

As far as recording a macro using relative references, I
guess you already know you can turn it off manually: after
you turn on the recorder, the on/off relative references
button appears on the "Stop Recording" toolbar. I don't
think there is a way to set a particular default on it.

-----Original Message-----
When I use ActiveCell.Offset(row,column).Select, I am

able
to select any cell in a position relative to the active
cell. I would like to know if it is possible to select
more than one cell at a time (or a range) that is put in

a
position relative to the active cell. Also, is it

possible
to record a macro that automatically uses relative
references instead of absolute references? Thank you.
.



All times are GMT +1. The time now is 02:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com