{"id":4918,"date":"2020-01-27T12:36:40","date_gmt":"2020-01-27T12:36:40","guid":{"rendered":"http:\/\/officetuts.net\/excel\/?p=4918"},"modified":"2024-03-26T10:08:26","modified_gmt":"2024-03-26T10:08:26","slug":"add-an-apostrophe-in-excel","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/","title":{"rendered":"Add an Apostrophe in Excel"},"content":{"rendered":"\n

If you want to add an apostrophe in Excel, you can do it\nusing a simple formula. Place it into cell B2<\/strong>.<\/p>\n\n\n\n

=\"'\"&A2<\/code><\/pre>\n\n\n\n
\"\"<\/figure>\n\n\n\n

There is another, simple method. You can use the CHAR function<\/a> instead of apostrophes. We need to pass a code that represents apostrophes. This code is 39<\/strong>.<\/p>\n\n\n\n

Now, the formula is going to look like this.<\/p>\n\n\n\n

=CHAR(39)&A2<\/code><\/pre>\n\n\n\n

You may want to consider using this one because it seems cleaner than the previous one. This method has a disadvantage in that you must remember the code.<\/p>\n\n\n\n

Both formulas are going to convert a value to a text. In our example, the cell with text stays text, and the cell with a number is converted to text.<\/p>\n\n\n\n

Leading and trailing apostrophes<\/h2>\n\n\n\n

Adding an apostrophe at the beginning is very similar to the previous example, and looks like this.<\/p>\n\n\n\n

=\"'\"&A2&\"'\"\n=CHAR(39)&A2&CHAR(39)<\/code><\/pre>\n\n\n\n
\"\"<\/figure>\n\n\n\n

The CONCAT function<\/h2>\n\n\n\n

You can use the CONCAT\nfunction<\/strong>. It will join multiple strings into a single one.<\/p>\n\n\n\n

Apostrophe at the beginning:<\/p>\n\n\n\n

=CONCAT(\"'\", A2)<\/code><\/pre>\n\n\n\n

Apostrophe at the beginning and the end:<\/p>\n\n\n\n

=CONCAT(\"'\", A2, \"'\")<\/code><\/pre>\n\n\n\n

VBA<\/h2>\n\n\n\n

If you want, you can add apostrophes to the same column that\ncontains values, instead of creating an additional one.<\/p>\n\n\n\n

This formula does it.<\/p>\n\n\n\n

Sub AddAnApostrophe()\n    For Each cell In Selection\n        cell.Value = \"'\" & cell.Value\n    Next cell\nEnd Sub<\/code><\/pre>\n\n\n\n

This is how you can use this formula.<\/p>\n\n\n\n

Select cells to which you want to add apostrophes and run\nthe code.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Let’s modify the procedure, so it will add a visible apostrophe to the values.<\/p>\n\n\n\n

Sub AddVisibleApostrophe()\n    For Each cell In Selection\n        cell.Value = \"''\" & cell.Value\n    Next cell\nEnd Sub<\/code><\/pre>\n\n\n\n

This is the result.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

In a similar way, you can modify the procedure to add apostrophes also at the end.<\/p>\n\n\n\n

Sub AddAnApostrophe()\n    For Each cell In Selection\n        cell.Value = \"''\" & cell.Value & \"'\"\n    Next cell\nEnd Sub<\/code><\/pre>\n\n\n\n

Immediate window<\/h2>\n\n\n\n

There is a tool in Excel, called Immediate Window<\/strong>. Many people don’t know about it, but it can be\nuseful as you can write commands and execute them on the spot. Let’s use it in\nthis example.<\/p>\n\n\n\n

First, you have to open VBE by pressing Left Alt + F11<\/strong> and then Ctrl + G<\/strong> to open the Immediate window.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Now, enter the following code and press Enter<\/strong>.<\/p>\n\n\n\n

for each v in range(\"C1:C2\") : v.value = \"'\" & v.value : next<\/code><\/pre>\n\n\n\n

This code works the same way as the first procedure AddAnApostrophe<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"

If you want to add an apostrophe in Excel, you can do it using a simple formula. Place it into cell B2. There…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[190],"yoast_head":"\nAdd an Apostrophe in Excel<\/title>\n<meta name=\"description\" content=\"Learn how to add an apostrophe in Excel using a simple formula or the CHAR function. Use these step-by-step instructions and improve your skills now.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Add an Apostrophe in Excel\" \/>\n<meta property=\"og:description\" content=\"Learn how to add an apostrophe in Excel using a simple formula or the CHAR function. Use these step-by-step instructions and improve your skills now.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-27T12:36:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-26T10:08:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2020\/01\/add-apostrophe.png\" \/>\n<meta name=\"author\" content=\"Tomasz Decker\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tomasz Decker\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/\"},\"author\":{\"name\":\"Tomasz Decker\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"headline\":\"Add an Apostrophe in Excel\",\"datePublished\":\"2020-01-27T12:36:40+00:00\",\"dateModified\":\"2024-03-26T10:08:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/\"},\"wordCount\":331,\"publisher\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"image\":{\"@id\":\"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2020\/01\/add-apostrophe.png\",\"keywords\":[\"pinterest\"],\"articleSection\":[\"examples\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/\",\"url\":\"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/\",\"name\":\"Add an Apostrophe in Excel\",\"isPartOf\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2020\/01\/add-apostrophe.png\",\"datePublished\":\"2020-01-27T12:36:40+00:00\",\"dateModified\":\"2024-03-26T10:08:26+00:00\",\"description\":\"Learn how to add an apostrophe in Excel using a simple formula or the CHAR function. Use these step-by-step instructions and improve your skills now.\",\"breadcrumb\":{\"@id\":\"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/#primaryimage\",\"url\":\"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2020\/01\/add-apostrophe.png\",\"contentUrl\":\"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2020\/01\/add-apostrophe.png\",\"width\":342,\"height\":166},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/officetuts.net\/excel\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Add an Apostrophe in Excel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/officetuts.net\/excel\/#website\",\"url\":\"https:\/\/officetuts.net\/excel\/\",\"name\":\"\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/officetuts.net\/excel\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42\",\"name\":\"Tomasz Decker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g\",\"caption\":\"Tomasz Decker\"},\"logo\":{\"@id\":\"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/\"},\"description\":\"Spreadsheet and Python enthusiast.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Add an Apostrophe in Excel","description":"Learn how to add an apostrophe in Excel using a simple formula or the CHAR function. Use these step-by-step instructions and improve your skills now.","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:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/","og_locale":"en_US","og_type":"article","og_title":"Add an Apostrophe in Excel","og_description":"Learn how to add an apostrophe in Excel using a simple formula or the CHAR function. Use these step-by-step instructions and improve your skills now.","og_url":"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/","article_published_time":"2020-01-27T12:36:40+00:00","article_modified_time":"2024-03-26T10:08:26+00:00","og_image":[{"url":"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2020\/01\/add-apostrophe.png"}],"author":"Tomasz Decker","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tomasz Decker","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/#article","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/"},"author":{"name":"Tomasz Decker","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"headline":"Add an Apostrophe in Excel","datePublished":"2020-01-27T12:36:40+00:00","dateModified":"2024-03-26T10:08:26+00:00","mainEntityOfPage":{"@id":"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/"},"wordCount":331,"publisher":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"image":{"@id":"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/#primaryimage"},"thumbnailUrl":"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2020\/01\/add-apostrophe.png","keywords":["pinterest"],"articleSection":["examples"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/","url":"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/","name":"Add an Apostrophe in Excel","isPartOf":{"@id":"https:\/\/officetuts.net\/excel\/#website"},"primaryImageOfPage":{"@id":"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/#primaryimage"},"image":{"@id":"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/#primaryimage"},"thumbnailUrl":"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2020\/01\/add-apostrophe.png","datePublished":"2020-01-27T12:36:40+00:00","dateModified":"2024-03-26T10:08:26+00:00","description":"Learn how to add an apostrophe in Excel using a simple formula or the CHAR function. Use these step-by-step instructions and improve your skills now.","breadcrumb":{"@id":"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/#primaryimage","url":"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2020\/01\/add-apostrophe.png","contentUrl":"https:\/\/officetuts.net\/excel\/wp-content\/uploads\/sites\/2\/2020\/01\/add-apostrophe.png","width":342,"height":166},{"@type":"BreadcrumbList","@id":"https:\/\/officetuts.net\/excel\/examples\/add-an-apostrophe-in-excel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/officetuts.net\/excel\/"},{"@type":"ListItem","position":2,"name":"Add an Apostrophe in Excel"}]},{"@type":"WebSite","@id":"https:\/\/officetuts.net\/excel\/#website","url":"https:\/\/officetuts.net\/excel\/","name":"","description":"","publisher":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/officetuts.net\/excel\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/41b0b6996aaa4c4127f86f3d24452d42","name":"Tomasz Decker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/18cbe22837193574870ae40ba56bf712?s=96&d=mm&r=g","caption":"Tomasz Decker"},"logo":{"@id":"https:\/\/officetuts.net\/excel\/#\/schema\/person\/image\/"},"description":"Spreadsheet and Python enthusiast."}]}},"_links":{"self":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/4918"}],"collection":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/comments?post=4918"}],"version-history":[{"count":3,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/4918\/revisions"}],"predecessor-version":[{"id":13038,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/posts\/4918\/revisions\/13038"}],"wp:attachment":[{"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/media?parent=4918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/categories?post=4918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/officetuts.net\/excel\/wp-json\/wp\/v2\/tags?post=4918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}