Article 27 - Remove Leading Apostrophe

By |Saturday, October 10th, 2015|Categories: Articles, VBA|Tags: , , , , , |3 Comments

Leading apostrophe is one of the widely used features of Excel. This is mostly used to make a cell treat its content as a character. It can also come through import of .csv files from various third party systems or data entries can be made with leading apostrophes. If you enter a number of more than 15 significant digits, Excel will immediately convert this to scientific notation. But there are business situations where you deal with numbers larger than 15 digits like credit card numbers which may be 16 digits. Now if you input credit card numbers as numeric, you will not be able to capture all 16 digits, so a solution is to enter them with leading apostrophe. It forces the cell to treat the entry as character and in character format you can show these 16 digits.(You can enter 32,767 characters in a cell though only 1024 characters will be displayed)

(more…)