{"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. CHAR( <\/strong>ASCII Number<\/em>)<\/strong><\/p>\n VBA.Chr( <\/strong>ASCII Number<\/em>)<\/strong> 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 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":"\n
\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>\nUse of ASCII numbers in Excel Formulas as well as Excel VBA programming <\/h3>\n
Excel Formulas<\/h2>\n
Excel VBA <\/h2>\n
\n<\/p>\n\n
\n Symbol<\/th>\n ASCII Code<\/th>\n Syntax – Excel Formula<\/th>\n Syntax – Excel VBA<\/th>\n<\/tr>\n \n $ – Dollar Sign <\/td>\n 36 <\/td>\n =Char(36) <\/td>\n VBA.Chr(36) <\/td>\n<\/tr>\n \n ” – Double Quote<\/td>\n 34 <\/td>\n =Char(34) <\/td>\n VBA.Chr(34) <\/td>\n<\/tr>\n \n & – Ampersand Sign<\/td>\n 38 <\/td>\n =Char(38) <\/td>\n VBA.Chr(38) <\/td>\n<\/tr>\n \n ( – Opening Braces <\/td>\n 40 <\/td>\n =Char(40) <\/td>\n VBA.Chr(40) <\/td>\n<\/tr>\n \n ) – Closing Braces <\/td>\n 41 <\/td>\n =Char(41) <\/td>\n VBA.Chr(41) <\/td>\n<\/tr>\n \n @ – At the rate Sign <\/td>\n 64 <\/td>\n =Char(64) <\/td>\n VBA.Chr(64) <\/td>\n<\/tr>\n<\/table>\n<\/span>","protected":false},"excerpt":{"rendered":"