VBA & Macro Problems

How to Make an Excel VBA Cell Reference Absolute in R1C1 Notation

Nimra MalikNimra Malik Oct 23, 2026 870 views

Question details

The user needs to create a fixed (absolute) column reference in an Excel VBA formula using R1C1 notation, equivalent to the dollar sign ($) in A1 notation.

Make an Excel VBA Cell Reference Absolute in R1C1 Notation
Product
Excel
Device & OS
not provided
Scenario
Writing an Excel VBA macro that dynamically inserts formulas using the R1C1 reference style and requires specific columns to be locked.
Observed behavior
The user wants to apply fixed (absolute) column referencing within an ActiveCell.FormulaR1C1 statement.
Before you start

Ensure that the Developer tab is enabled in your spreadsheet program and that you are familiar with accessing the VBA Editor (ALT + F11).

Solution 1Recommended

Use Unbracketed Numbers for Absolute References

In R1C1 notation, brackets denote relative references. Omit the brackets around the row or column number to make it an absolute reference.

In traditional A1 notation, absolute references are created by placing a dollar sign ($) before the row or column (e.g., $D1). In R1C1 notation, relative references are enclosed in square brackets, such as R[1]C[2].

To lock the reference and make it absolute, simply remove the brackets and write the absolute row or column number directly.

1
Open the VBA Editor

Press ALT + F11 to launch the Visual Basic for Applications Editor, then open the specific module containing your macro.

2
Format the Absolute Column

Locate your ActiveCell.FormulaR1C1 assignment line. Type the column number without brackets to lock it. For example, use C4 to create an absolute reference to Column 4 (Column D).

3
Implement the Code

Write the complete formula string using the unbracketed reference. For example, to reference absolute Column D on the active row, type: ActiveCell.FormulaR1C1 = "=IF(RC4=\"\",\"1\",RC4)"

4
Run and Test

Execute the macro and verify the spreadsheet cells. The resulting formula in the worksheet should reflect a locked column equivalent to $D in A1 notation.

Use Unbracketed Numbers for Absolute References
Absolute Rows and Columns: You can apply this exact same rule to rows. For example, R5C4 points absolutely to Row 5, Column 4, which is equivalent to $D$5 in A1 notation.
Advanced Spreadsheet Automation

Write and Execute VBA Macros in WPS Spreadsheet

WPS Office provides comprehensive support for VBA and macros, allowing you to seamlessly run your R1C1 notation scripts and automate your spreadsheet tasks.

  1. 1. Download and Install: Download and install WPS Office on your device.
  2. 2. Open WPS Spreadsheet: Launch WPS Spreadsheet and navigate to the Developer tab.
  3. 3. Access the VBA Editor: Click on the VBA Editor icon to open the scripting environment.
  4. 4. Run your Macro: Insert your VBA code with the absolute R1C1 notation and click Run to automate your task.
Fully supports Excel VBA macros and R1C1 reference stylesHighly compatible with Microsoft Excel (.xlsm) formatsLightweight, fast, and completely free to download
microsoft office alternative - wps office

Frequently Asked Questions

What is the primary difference between R1C1 and A1 notation?

A1 notation uses letters for columns and numbers for rows (e.g., A1), while R1C1 notation uses numbers for both rows and columns (e.g., R1C1). R1C1 is particularly advantageous in VBA macros because it allows you to easily compute offsets and loop through cells numerically.

How do I reference an absolute row and column together in R1C1 notation?

To reference a completely fixed cell, use unbracketed numbers for both the row and column. For example, R10C5 references absolute row 10 and absolute column 5, which perfectly translates to $E$10 in standard A1 notation.

Can I mix relative and absolute references in R1C1 notation?

Yes, you can easily combine them. For instance, the reference R[1]C5 refers to one row down relatively (indicated by the brackets), but locks the column reference to absolute Column 5 (indicated by the lack of brackets).

Why is my VBA code throwing an error when I use R1C1 notation?

Errors typically occur if you use the standard .Formula property instead of .FormulaR1C1 when assigning an R1C1 string, or if there is a syntax error in formatting your quotation marks within the formula string.