The "why" is simple: those apostrophes are present in EVERY cell containing or being treated as text. Excel does not normally display them, either in the formula editor or in the grid's display of the contents, but they exist.
The places they show are places that Excel has been coerced into displaying them. One way is the obvious, that of actually typing one before completing one's entry or edit. However, other mechanisms make them visible as well.
Corresponding characters exist for the other basic alignment formattings, "center" (^)
and "right" (")
. Again, not normally shown to us humans.
One way I know of to get one is to do the following:
- Format a cell as TEXT.
- Type
=746
in it. (Entering a number makes a difference.)
- Edit the cell to include an apostrophe after the
=
before the 7
.
- Press
Enter
.
The cell will display =746
on the grid, but in the formula editor, you will see '='746
. Note the new apostrophe before the =
.
This is a situation in which the exact material being handled in the circumstances ends up with Excel showing the apostrophe. Edit the cell, removing the '
AFTER the =
and to replace 746
with abc
(so placing clearly textual character in place of the numeric characters) and press Enter
. Even though the cell is formatted as text and contains what is clearly text, Excel will still show the leading apostrophe. Once shown, it does not seem to stop displaying them.
Even copying text from elsewhere and pasting values does not. Once a cell has the displaying of the apostrophe turned on, it seems to stay on.
Importantly, it is simply displayed. It has no effect on calculations. For instance, LEN()
will show 5 in the above example with 746, not 6.
You can often, though also often not, easily see the apostrophe being present during much data entry if you watch the entry closely. A leading apostrophe will often be visible during entry, though often it flickers. And then NOT present in the displayed cell contents, either on the grid or in the formula editor.
They are not harmful in any way, just disturbing. Probably why no one seems to have delved much into how to cause them, only to remove them. Or more properly, stop displaying them.
(Since you — pointedly — disdain the idea of anything about how to stop their display, I shall not mention one easy way. Perhaps it is one of the three ways harrymc
links to.)
There isn't much lying about regarding why Excel comes to show some, though the little I've read suggests an action is taken that triggers Excel (what is called "coercion" when done on purpose to make Excel do things it does not normally do). Not necessarily a wrongful action at all, just an action. (The following does NOT happen. It is just a quick pretend example of a series of actions as I do not teach this subject and have a real such example in my pocket.) For instance, cells with a General format have entries, some numeric. One creates a Table using them as headers. Excel converts whatever is in them to text. Any purely numeric cell values start having their formatting characters shown (leading apostrophe in your case). (Again, just a pretend example that actually does not happen.)
To summarize, they are always present, just not shown.
(A little more for the "746" example above: If you copy the formatting of the cell that shows the leading apostrophe to another cell (so formats are identical), then paste the value of the copied "746" cell ('='746
) to it, the leading apostrophe is gone. Well, that happens, things like that anyway, with Excel. Then recalcing or editing the cell causes it to revert to how you expected it to be. But in this case it does not. So the exact FORM of things is not the issue, but rather the sequence of actions that led to that form, they typing steps and so on. Odd, no?)