logo
search
VBA & Macro Problems

How to Prevent Excel VBA from Adding @ and Quotes to Cell References

Maira MehtabMaira Mehtab Sep 22, 2026 868 views

Question details

The user needs to stop Excel VBA from automatically inserting an @ symbol and single quotes around cell references like F3 when assigning formulas via macros.

Product
Microsoft Excel
Device & OS
not provided
Scenario
Writing a VBA macro to fill down a formula across multiple rows, requiring a relative cell reference without unwanted character modifications by the Excel formula engine.
Observed behavior
When using FormulaR1C1 or Formula2R1C1 in VBA, Excel modifies a standard A1-style reference (e.g., F3) into an invalid format like @'F3' or 'F3'.
Before you start

Verify whether your VBA macro is currently designed to use A1-style references (like F3) or R1C1-style references (like R3C6), as mixing these formats causes syntax errors.

Solution 1Recommended

Use the Formula2 Property for A1-Style References

This is the most direct solution if you prefer to write cell references in standard A1 format without Excel misinterpreting them.

The FormulaR1C1 and Formula2R1C1 properties strictly expect R1C1 notation. If you pass an A1-style reference like 'F3' to these properties, Excel fails to recognize it as a valid coordinate. Instead, it assumes it is a named range or string, wrapping it in quotes and adding the @ (implicit intersection) operator.

1
Open the VBA Editor

Press Alt + F11 on your keyboard to open the Visual Basic for Applications (VBA) interface.

2
Locate the problematic macro code

Find the specific module and line of code where you are assigning the formula using FormulaR1C1 or Formula2R1C1.

3
Change the property to Formula2

Modify the code to use the Formula2 property instead. For example, change Range("A1").Formula2R1C1 = "=F3" to Range("A1").Formula2 = "=F3".

4
Ensure relative referencing

Verify that your cell reference does not contain absolute markers (dollar signs). Use F3 instead of $F$3 so the formula updates correctly when filled down rows.

Why use Formula2?: Formula2 integrates with Excel's modern dynamic array engine, preventing the automatic addition of the @ symbol that often occurs with the older Formula property.
Free Microsoft Office alternative

Experience Seamless Spreadsheet Management with WPS Office

If you frequently encounter complex VBA syntax issues or dynamic array formula quirks in Microsoft Excel, consider trying WPS Office. It provides a lightweight, highly compatible spreadsheet environment that handles complex calculations effortlessly.

Fully compatible with Microsoft Excel (.xlsx, .xls) files and formulas.Lightweight architecture ensures fast loading and smooth data processing.Familiar user interface with zero learning curve for existing Excel users.Reliable and intuitive spreadsheet environment for standardizing daily tasks.
QA img-9

Frequently Asked Questions

Why does Excel add an @ symbol to my VBA formulas?

Excel adds the @ symbol, known as the implicit intersection operator, when it encounters a potential array formula in an environment that expects a single value. Mixing A1-style references with R1C1 properties often triggers this behavior in modern Excel versions.

What is the difference between Formula and Formula2 in VBA?

The Formula property uses Excel's older formula calculation engine, while Formula2 uses the newer dynamic array engine. Using Formula2 is recommended in modern Excel builds to properly handle arrays without forcing implicit intersection (@) behavior.

Why are single quotes added around my cell reference in VBA?

Single quotes are automatically added when Excel cannot parse the provided reference string within the context of the property used. Passing an A1 reference (like F3) to an R1C1-exclusive property causes Excel to treat the reference as an unknown named range or raw string, wrapping it in quotes.

How do I make a relative reference in R1C1 notation?

To create a relative R1C1 reference, use square brackets to indicate the offset distance from the cell containing the formula. For example, R[1]C[1] refers to one row down and one column to the right, whereas R1C1 without brackets is an absolute reference to cell A1.