{"id":1696,"date":"2016-04-20T19:35:59","date_gmt":"2016-04-20T19:35:59","guid":{"rendered":"http:\/\/www.learnexcelmacro.com\/?p=1696"},"modified":"2016-04-20T19:35:59","modified_gmt":"2016-04-20T19:35:59","slug":"using-special-characters-in-formula","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/","title":{"rendered":"Excel Tip: How to refer characters using ASCII Value"},"content":{"rendered":"

Hello friends,<\/p>\n

In this article, I am going to explain you, how can you use special characters in Excel VBA and formulas without breaking the syntax.
\nFor Example: <\/strong>You can not use double quote or any other Special Characters, which are generally a part of Formula Syntax,\u00a0 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.<\/p>\n

Use of ASCII numbers in Excel Formulas as well as Excel VBA programming <\/h3>\n

Excel Formulas<\/h2>\n

CHAR( <\/strong>ASCII Number<\/em>)<\/strong><\/p>\n

Excel VBA <\/h2>\n

VBA.Chr( <\/strong>ASCII Number<\/em>)<\/strong>
\n<\/p>\n

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:<\/p>\n\n\n\n\n\n\n\n\n
Symbol<\/th>\nASCII Code<\/th>\nSyntax – Excel Formula<\/th>\nSyntax – Excel VBA<\/th>\n<\/tr>\n
$ – Dollar Sign <\/td>\n36 <\/td>\n=Char(36) <\/td>\nVBA.Chr(36) <\/td>\n<\/tr>\n
” – Double Quote<\/td>\n34 <\/td>\n=Char(34) <\/td>\nVBA.Chr(34) <\/td>\n<\/tr>\n
& – Ampersand Sign<\/td>\n38 <\/td>\n=Char(38) <\/td>\nVBA.Chr(38) <\/td>\n<\/tr>\n
( – Opening Braces <\/td>\n40 <\/td>\n=Char(40) <\/td>\nVBA.Chr(40) <\/td>\n<\/tr>\n
) – Closing Braces <\/td>\n41 <\/td>\n=Char(41) <\/td>\nVBA.Chr(41) <\/td>\n<\/tr>\n
@ – At the rate Sign <\/td>\n64 <\/td>\n=Char(64) <\/td>\nVBA.Chr(64) <\/td>\n<\/tr>\n<\/table>\n<\/span>","protected":false},"excerpt":{"rendered":"

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,\u00a0 directly in a cell while using formula because […]<\/p>\n","protected":false},"author":45,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[1246,1679,1675,1676],"tags":[],"class_list":["post-1696","post","type-post","status-publish","format-standard","hentry","category-macro","category-excel-macro-beginner","category-excel-macro-for-beginners","category-excel-tips"],"yoast_head":"\nLearn how to type special characters in Excel formulas and VBA without spoiling the Syntax<\/title>\n<meta name=\"description\" content=\"Learn how to type special characters in Excel formulas and VBA without spoiling the Syntax. You can use double quotes (""), ampersand sign (&), single quote (' ) etc. in your excel formula and VBA without any error.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Excel Tip: How to refer characters using ASCII Value\" \/>\n<meta property=\"og:description\" content=\"Learn how to type special characters in Excel formulas and VBA without spoiling the Syntax. You can use double quotes (""), ampersand sign (&), single quote (' ) etc. in your excel formula and VBA without any error.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/\" \/>\n<meta property=\"og:site_name\" content=\"Let's excel in Excel\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/vmlogger\" \/>\n<meta property=\"article:author\" content=\"http:\/\/www.facebook.com\/vmlogger\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-20T19:35:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2022\/07\/vmlogger.com_-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Vishwamitra Mishra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/www.twitter.com\/learnexcelmacro\" \/>\n<meta name=\"twitter:site\" content=\"@learnexcelmacro\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vishwamitra Mishra\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/\"},\"author\":{\"name\":\"Vishwamitra Mishra\",\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\"},\"headline\":\"Excel Tip: How to refer characters using ASCII Value\",\"datePublished\":\"2016-04-20T19:35:59+00:00\",\"dateModified\":\"2016-04-20T19:35:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/\"},\"wordCount\":210,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\"},\"articleSection\":[\"Excel Macro\",\"Excel Macro Beginner\",\"Excel Macro Tutorial\",\"Excel Tips\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/\",\"url\":\"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/\",\"name\":\"Learn how to type special characters in Excel formulas and VBA without spoiling the Syntax\",\"isPartOf\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/#website\"},\"datePublished\":\"2016-04-20T19:35:59+00:00\",\"dateModified\":\"2016-04-20T19:35:59+00:00\",\"description\":\"Learn how to type special characters in Excel formulas and VBA without spoiling the Syntax. You can use double quotes (\\\"\\\"), ampersand sign (&), single quote (' ) etc. in your excel formula and VBA without any error.\",\"breadcrumb\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/vmlogger.com\/excel\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Excel Macro\",\"item\":\"https:\/\/vmlogger.com\/excel\/macro\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Excel Tip: How to refer characters using ASCII Value\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/vmlogger.com\/excel\/#website\",\"url\":\"https:\/\/vmlogger.com\/excel\/\",\"name\":\"Let's excel in Excel\",\"description\":\"Let's share knowledge\",\"publisher\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/vmlogger.com\/excel\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\",\"name\":\"Vishwamitra Mishra\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2022\/07\/avataaars-1.png\",\"contentUrl\":\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2022\/07\/avataaars-1.png\",\"width\":528,\"height\":560,\"caption\":\"Vishwamitra Mishra\"},\"logo\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/image\/\"},\"description\":\"My name is Vishwamitra Mishra. Friends Call me Vishwa. I hold a Bachelor\u2019s Degree in Computer Science from D.A.V.V. Indore & currently working as a Technical Lead having over 7 years of experience.\",\"sameAs\":[\"http:\/\/www.learnexcelmacro.com\",\"http:\/\/www.facebook.com\/vmlogger\",\"https:\/\/x.com\/https:\/\/www.twitter.com\/learnexcelmacro\",\"https:\/\/www.youtube.com\/c\/VMLogger\"],\"url\":\"https:\/\/vmlogger.com\/excel\/author\/vishwamitra\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Learn how to type special characters in Excel formulas and VBA without spoiling the Syntax","description":"Learn how to type special characters in Excel formulas and VBA without spoiling the Syntax. You can use double quotes (\"\"), ampersand sign (&), single quote (' ) etc. in your excel formula and VBA without any error.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/","og_locale":"en_US","og_type":"article","og_title":"Excel Tip: How to refer characters using ASCII Value","og_description":"Learn how to type special characters in Excel formulas and VBA without spoiling the Syntax. You can use double quotes (\"\"), ampersand sign (&), single quote (' ) etc. in your excel formula and VBA without any error.","og_url":"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/","og_site_name":"Let's excel in Excel","article_publisher":"http:\/\/www.facebook.com\/vmlogger","article_author":"http:\/\/www.facebook.com\/vmlogger","article_published_time":"2016-04-20T19:35:59+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2022\/07\/vmlogger.com_-1.png","type":"image\/png"}],"author":"Vishwamitra Mishra","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/www.twitter.com\/learnexcelmacro","twitter_site":"@learnexcelmacro","twitter_misc":{"Written by":"Vishwamitra Mishra","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/#article","isPartOf":{"@id":"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/"},"author":{"name":"Vishwamitra Mishra","@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5"},"headline":"Excel Tip: How to refer characters using ASCII Value","datePublished":"2016-04-20T19:35:59+00:00","dateModified":"2016-04-20T19:35:59+00:00","mainEntityOfPage":{"@id":"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/"},"wordCount":210,"commentCount":1,"publisher":{"@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5"},"articleSection":["Excel Macro","Excel Macro Beginner","Excel Macro Tutorial","Excel Tips"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/","url":"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/","name":"Learn how to type special characters in Excel formulas and VBA without spoiling the Syntax","isPartOf":{"@id":"https:\/\/vmlogger.com\/excel\/#website"},"datePublished":"2016-04-20T19:35:59+00:00","dateModified":"2016-04-20T19:35:59+00:00","description":"Learn how to type special characters in Excel formulas and VBA without spoiling the Syntax. You can use double quotes (\"\"), ampersand sign (&), single quote (' ) etc. in your excel formula and VBA without any error.","breadcrumb":{"@id":"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/vmlogger.com\/excel\/2016\/04\/using-special-characters-in-formula\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vmlogger.com\/excel\/"},{"@type":"ListItem","position":2,"name":"Excel Macro","item":"https:\/\/vmlogger.com\/excel\/macro\/"},{"@type":"ListItem","position":3,"name":"Excel Tip: How to refer characters using ASCII Value"}]},{"@type":"WebSite","@id":"https:\/\/vmlogger.com\/excel\/#website","url":"https:\/\/vmlogger.com\/excel\/","name":"Let's excel in Excel","description":"Let's share knowledge","publisher":{"@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vmlogger.com\/excel\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5","name":"Vishwamitra Mishra","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/image\/","url":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2022\/07\/avataaars-1.png","contentUrl":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2022\/07\/avataaars-1.png","width":528,"height":560,"caption":"Vishwamitra Mishra"},"logo":{"@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/image\/"},"description":"My name is Vishwamitra Mishra. Friends Call me Vishwa. I hold a Bachelor\u2019s Degree in Computer Science from D.A.V.V. Indore & currently working as a Technical Lead having over 7 years of experience.","sameAs":["http:\/\/www.learnexcelmacro.com","http:\/\/www.facebook.com\/vmlogger","https:\/\/x.com\/https:\/\/www.twitter.com\/learnexcelmacro","https:\/\/www.youtube.com\/c\/VMLogger"],"url":"https:\/\/vmlogger.com\/excel\/author\/vishwamitra\/"}]}},"_links":{"self":[{"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/posts\/1696"}],"collection":[{"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/comments?post=1696"}],"version-history":[{"count":0,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/posts\/1696\/revisions"}],"wp:attachment":[{"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/media?parent=1696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/categories?post=1696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/tags?post=1696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}