Hello friends,

In this article, I am going to explain you, how can you use special characters in Excel VBA and formulas without breaking the syntax.
For Example: You can not use double quote or any other Special Characters, which are generally a part of Formula Syntax,  directly in a cell while using formula because using them, will spoil the syntax of the formula and it will through an error. To overcome this issue, one can use the ASCII number of those characters. ASCII values can be used to refer the characters in both Excel formulas as well as Excel VBA.

Use of ASCII numbers in Excel Formulas as well as Excel VBA programming

Excel Formulas


Excel VBA

VBA.Chr( ASCII Number)

Here is the list of ASCII keys of few most used symbols which may affect the formula syntax in Excel if they are used as it is:

SymbolASCII CodeSyntax – Excel FormulaSyntax – Excel VBA
$ – Dollar Sign36=Char(36)VBA.Chr(36)
” – Double Quote34=Char(34)VBA.Chr(34)
& – Ampersand Sign38=Char(38)VBA.Chr(38)
( – Opening Braces40=Char(40)VBA.Chr(40)
) – Closing Braces41=Char(41)VBA.Chr(41)
@ – At the rate Sign64=Char(64)VBA.Chr(64)


Join over 10, 000+ Excel VBA Enthusiasts & get this FREE e-Book Now!