|
Home > Structure > Workbook > Columns
Excel Column Numbers or Letters
|

|
Sometimes Excel column headings show numbers (1, 2, 3), instead of column letters (A, B, C). See why that happens, and how to change column heading numbers back to letters, if you open a workbook with that problem!
|
|

Column Headings Show Numbers
When you open an Excel file, you might see numbers -- 1, 2, 3 --
across the column headings, instead of letters -- A, B, C.
Also, if you click on a formula cell, the cell addresses look strange. For example, in the screen shot below one address is RC[-2], instead of the usual C2.
In the sections below, I show why this happens, and the easy steps to fix the problem

Video: Change Column Numbers to Letters
To see why the column headings change to numbers, instead of column letter, and how to switch the column headings back to letters, watch this short video.
There are written steps and screen shots, below the video.
Why Column Heading Numbers?
If you see numbers in the Excel column headings, the workbook is set to R1C1 reference style. Usually, a workbook uses A1 reference style.
- R1C1: cell address shows its row number, followed by its column number.
- A1: cell address shows its column letter, followed by its row number
Why is R1C1 Turned On?
If you didn’t turn the R1C1 option on, why did the numbers suddenly appear?
It usually happens because:
- Someone sent you a workbook, in which they used R1C1 style
- That’s the first Excel file that you opened in this work session.
First Workbook
The first workbook that you open, when opening Excel, sets the reference style for all workbooks in that session of Excel. Here's an example of what could happen:
- Yesterday, I built a workbook for you, and saved it while I was using R1C1 reference style.
- Late last night, I sent you the workbook
- The first Excel file that you opened this morning was my (R1C1) workbook.
- Surprise! There are numbers in the column headings, instead of letters
- Thne, when you open your own files, a few minutes later, they have number in the column headings too..
Change Column Headings to Letters
In the sections below, I'll show you 3 ways to get back to letter headings for the Excel columns:
- A) Close Excel and Start Over
- B) Change an Option Setting
- C) Use a Macro
A) Close Excel and Start Over
A quick way to fix the number heading problem is to close Excel and start over!
- First, close all of the Excel files that you have open.
- If you've made changes in any of the files, you can save the changes
- Next, open an Excel workbook that you created yourself, with letters in the column headings.
- DO NOT open a file that you used and saved a few minutes ago, when number headings were showing
- When your "column letters" file opens, it will automatically change the reference style back to A1, showing letters in the column headings.
- Now, open the "column numbers" file, and it will change to the A1 (letters) style too.
B) Change an Option Setting
Instead of starting over, you can change an Excel option, to switch to A1 style
To change the option setting, follow the steps below:
- In the Excel Ribbon, click the File tab, at the far left
- Next, in the list at the left, click Options (you might need to click More, and then click Options)
- In the Excel Options window, at the left, click the Formulas category.
- In the Working with Formulas section, add or remove the check mark from ‘R1C1 reference style’
- Click OK to close the Options window

If you removed the check mark for R1C1, the Excel column numbers change to column letters
Note: Row headers are always numbers, in both A1 reference style, and R1C1 reference style
C) Macro to Change R1C1 Setting
If you frequently change the headings from numbers to letters, or letters to numbers, you can use a macro to do make the change quickly.
In the sections below, I show 2 ways to get a macro ready to use
- 1) Copy/Paste: Copy the macro code below, and paste it into a regular code module in your Excel Personal Workbook, and then run it when needed.
- 2) Record/Edit: Or, watch the video below, to see how to record your own macro, and add a button for the macro on the Quick Access Toolbar.
Sample Files
In the Download section below, you can get an Excel file that contains sample data, and both of the macros that are shown in the section below.
On the SalesData sheet, there's a button you can click, to quickly switch the reference style between R1C1 and A1.

C1) Copy/Paste Macro Code
Copy the following macro code to a regular code module in your Excel Personal Workbook, and run it when needed.
NOTE: This macro toggles the reference style, so if the current setting has R1C1 (numbers) reference style turned on, it turns that setting off, to go back to A1 style (letters), and vice versa
Sub ToggleR1C1
' short code - simple toggle
' apply reference style NOT in use
Application.ReferenceStyle = _
xlA1 + xlR1C1 - Application.ReferenceStyle
End Sub
C2) Record / Edit Macro
Watch this video, to see how to record your own macro, and add a button for the macro on the Quick Access Toolbar.
Note: This video uses a slightly longer version of the macro code, shown below.
How to Record/Edit Macro
Listed below are the steps to record a macro while you change the R1C1 opton setting. After that, see how to make a few minor changes to the recorded code.
Step 1: Record Macro
To see the Excel VBA code that changes the setting, we can use the Excel Macro Recorder.
Get Started with Macro
- First, at the bottom left of Excel, click the Macro Recorder button
- In the Record Macro window, type a name for the macro, ToggleR1C1,
- In the 'Store macro in' drop-down list, select Personal Macro Workbook
- (optional) Type a short description for the macro.
Record the Steps
While the Macro Recorder is turned on, follow the steps below:
- At the top left of Excel, click the File tab
- In the list at the left, go to the bottom, and click Options,
- In the Excel Options window, click the Formulas category
- Scroll down to the 'Working with Formulas' section
- Add a check mark to R1C1 reference style, to turn the setting on
- Click OK, to close the Options window
Repeat the steps
- Next, repeat the steps, to go back to the Excel Options, Formulas category
- This time, remove the check mark, to turn the R1C1 reference style off
- Click OK, to close the Options window
- Turn off the Macro Recorder
Step 2: View Recorded VBA code
Next, you can look at the code you recorded, in the Visual Basic Editor.
- On the Excel Ribbon, go to the View tab, and click Macros
- In the list of Macros, click ToggleR1C1
- Click the Edit button, to see the recorded code, that will look something like this:

- Tip: The lines that start with an apostrophe are comments, and you can delete them in this example.
Step 3: Edit Recorded VBA code
In the recorded Excel VBA code, there are two lines that change the reference style.
- The first line sets it to R1C1
- The second line sets it to A1 style.
Application.ReferenceStyle = xlR1C1
Application.ReferenceStyle = xlA1
Add If...Then...Else
We could put those two lines into separate macros, but I'd rather have a single macro, that can switch the current setting, to the opposite setting.
Below, you can see the final code that I created in the video.
I added lines with If...Then...Else...End If, to check the current reference style setting, then change it to the opposite one..
Sub ToggleR1C1_FromVideo
' code shown in video
' check for A1 reference style
' -- If, Then, Else
If Application.ReferenceStyle = xlA1 Then
Application.ReferenceStyle = xlR1C1
Else
Application.ReferenceStyle = xlA1
End If
End Sub
How the Macro Works
The revised macro, if written in English instead of Excel VBA, would say this:
- If the current reference style is A1, then
- Change the Reference style to R1C1
- Otherwise (if it’s not A1)
- Change the Reference style to A1
Video: Add Macro to QAT
To make this macro easy to use, you can add it to Excel's Quick Access Toolbar (QAT).
This short video shows the steps, and there are written steps below the video;
Add Macro to QAT
To put the macro button on the QAT, follow the steps below:
- At the right end of the QAT, click the drop down arrow
- Click More Commands
- In the Choose commands from drop down, click Macros
- In the list of macros, click the PERSONAL.XLS!ToggleR1C1 macro
- Click Add, to move it to the Quick Access Toolbar

- In the QAT list, click the PERSONAL.XLS!ToggleR1C1 macro
- Click Modify, and click on an icon for the macro (I use the 8-ball), then click OK

- Click OK, to close the Excel Options window.
Test the Macro Button
On the QAT, click the new button, to toggle the reference style setting between A1 and R1C1.
- All OK: If everything went correctly, the column heading letters and numbers switch, every time you click the QAT button.
- Not Working: If there's a problem, check the code in the previous section, and compare it with your macro code. Maybe there's a minor error that you need to fix.
Get the Excel Files
- R1C1 File: Download the Column Numbers sample file with R1C1 reference style turned on. The zipped file is in xlsx format, and does not contain any macros.
- Note: To see the R1C1 style, be sure to close all Excel files. Then, open this file first, before any other files.
- R1C1 Macro: Download the Reference Style Macro sample file. It is zipped, and in
xlsm format, and contains 2 macros to toggle between R1C1 and A1 reference styles.
🐰 Down the Rabbit Hole 🐰
In this section, you'll find related Excel tips, shortcuts, skills, and details. These things are nice to know, but not essential, so you can skip this section, and get back to work. Or dive in, for some extra Excel fun and knowledge!
--a) R1C1 Benefits
a) R1C1 Benefits
The R1C1 style can be confusing, if you haven't used it before!
However, there are benefits to this style, in some Excel situations.
I sometimes use R1C1 when programming or setting up a workbook.
- Numbers on the column headings make it easier to set up formulas that need a column number, such as VLOOKUP.
- I don’t have to manually count across the columns, to get a column number where the lookup value is.
Get Monthly Excel Tips!
Don't miss my monthly Excel newsletter! You'll get quick tips, article links, and a bit of fun. Add your email, and click Sign Up.
Next, when you get my reply, click the Confirm button. I add this step to protect you from spam!
More Excel Tips and Tutorials
Worksheet Tips
Worksheet Macros
Excel Freeze Panes
Status Bar Tips
Workbook Tips
Macros - Get Started