Excel VBA: Changing the Reference Style to R1C1

This Excel VBA macro switches to the R1C1 reference style.

Macro Example

Sub ChangeReferenceStyle_R1C1 ()

 Application.ReferenceStyle = xlR1C1

End Sub

Description

Application

  Application...

The Application property returns an Application object.

obj-Excel-Global-Application

Application.ReferenceStyle

  Application.ReferenceStyle...

The Application.ReferenceStyle property returns or sets how Microsoft Excel displays cell references and row and column headings in either A1 or R1C1 reference style.

obj-Excel-Application-ReferenceStyle

In this macro, I’m setting it to xlR1C1 so that the reference style switches to R1C1.

obj-Excel-XlReferenceStyle-xlR1C1

Sub ChangeReferenceStyle_R1C1 ()

 Application.ReferenceStyle = xlR1C1

End Sub

Properties

http://www.relief.jp/itnote/archives/003748.php

Apply to

  • Excel 2013
  • Excel 2010
  • Excel 2007