FormulaR1C1 Property In Excel VBA (In Easy Steps)
This example illustrates the difference between A1, R1C1 and R[1]C[1] style in Excel VBA.
1. Place a command button on your worksheet and add the following code line (A1 style):
Range("D4").Formula = "=B3*10"Result:

2. Add the following code line (R1C1 style):
Range("D4").FormulaR1C1 = "=R3C2*10"Result:

Explanation: cell D4 references cell B3 (row 3, column 2). This is an absolute reference ($ symbol in front of the row number and column letter).
3. Add the following code line (R[1]C[1] style):
Range("D4").FormulaR1C1 = "=R[-1]C[-2]*10"Result:
![R[1]C[1] Style R[1]C[1] Style](images/formulaR1C1/R[1]C[1]-style.png)
Explanation: cell D4 references cell B3 (one row above and 2 columns to the left). This is a relative reference. This code line gives the exact same result as the code line used at step 1.
4. Why learning about this? Because the Macro Recorder uses the FormulaR1C1 property (R[1]C[1] style). The Macro Recorder creates the following code lines if you enter the formula =B3*10 into cell D4.

Explanation: you can see that this is the exact same code line used at step 3.
6/9 Completed! Learn much more about creating macros ➝Next Chapter: MsgBox
- Chapter
- Create a Macro
-
Learn more, it's easy
- Swap Values
- Run Code from a Module
- Macro Recorder
- Use Relative References
- FormulaR1C1
- Add a Macro to the Toolbar
- Enable Macros
- Protect Macro
-
Download Excel File
- formulaR1C1.xlsm
- Next Chapter
- MsgBox
Follow Excel Easy
![]()
-
Become an Excel Pro
- 1. Introduction
- 2. Basics
- 3. Functions
- 4. Data Analysis
- 5. VBA
FormulaR1C1 • © 2010-2025 December 2025 Highlights: Calendar • Holidays • Gantt Chart • Regression • Find Duplicates
Từ khóa » C Vba
-
Getting Started With VBA In Office - Microsoft Docs
-
Range Object (Excel) | Microsoft Docs
-
Excel VBA - What Is VBA In Excel? Definition And Overview
-
What Does "c" Mean Next To A String In Vba? - Stack Overflow
-
Top 100 Useful Excel MACRO CODES Examples [VBA Library] + PDF
-
Excel VBA Tutorial For Beginners: Learn In 3 Days - Guru99
-
Visual Basic For Applications (VBA) Definition - Investopedia
-
VBA IF Statement - A Complete Guide - Excel Macro Mastery
-
VBA IF OR | How To Use IF Condition With OR Function In Excel VBA?
-
MS Excel: How To Use The MKDIR Statement (VBA) - TechOnTheNet
-
VBA Code Examples For Excel
-
Visual Basic For Applications - Wikipedia
-
How To Use Excel SendKeys Method In Macros - Contextures
-
Excel VBA Beginner Tutorial (Part 1 Of 3) - YouTube