What are Relative References?

In Excel, the way of recording actions within a macro that is relative to the cell or range that the macro starts from is known as a relative reference. When you start recording a macro with relative reference, Excel records the actions based on the position of the active cell at the beginning of the macro. The recorded actions will adjust accordingly when the macro is run on different ranges.

Relative References in Excel Macros

We have two options to refer a cell in Excel VBA Absolute references and Relative references.  Default Excel records macro in Absolute mode.

In this article, we learn about Relative references in Excel VBA.  We select a cell “A1”, turn on “Use Relative Reference” and record a macro to type some text in cells B2:B4.  

Since we turn on the “Relative reference” option.  Macro considers the number of rows and columns from active cells.  In our example, we select cell A1 and start type B2, which is to move one column and one row from A1 (Active cell).

Similar Reads

What are Relative References?

In Excel, the way of recording actions within a macro that is relative to the cell or range that the macro starts from is known as a relative reference. When you start recording a macro with relative reference, Excel records the actions based on the position of the active cell at the beginning of the macro. The recorded actions will adjust accordingly when the macro is run on different ranges....

Using Relative References

We must make sure that the macro is recorded starting from the cell where the steps must begin in order to record a macro with relative references....

Reasons for Relative Reference Not Working

In Excel, relative referencing occasionally fails to function. The “Use Relative References” function being disabled is one potential explanation for relative referencing not being functional....

FAQs on Relative References in Excel Macros

Q1: What is Relative Reference in Excel Macros?...