Number Stored as Text

A number stored as text is a cell whose content looks numeric but whose type is text. It usually arrives from an import, a copy-paste out of a web page or PDF, or a column that was formatted as text before anyone typed into it. The value displays normally, which is what makes it worth naming: nothing on screen says the cell will behave differently.

The consequence is silent exclusion rather than an error. Microsoft documents that SUM “will ignore text values and give you the sum of just the numeric values” when they sit inside a referenced range, so those referenced text cells do not contribute to the total. Excluding a positive amount lowers the sum relative to including it; excluding a negative amount raises it. Note the asymmetry with text typed straight into a formula, which is coerced instead โ€” =VALUE("80") returns 80 and ="a"+1 returns #VALUE!. It is specifically the cell-in-a-range case that goes quiet.

Three cheap detections. Default alignment differs, since numbers sit right and text sits left unless someone has overridden it. Excel marks the cells with a green triangle through background error checking. And comparing COUNT with COUNTA across a column that should be entirely numeric gives you the number of suspect rows without inspecting any of them, because COUNT takes only numbers while COUNTA takes anything non-empty.

The documented repairs are the error-checking menu’s Convert to Number, multiplying by 1 through Paste Special, or a helper column using VALUE. Run TRIM first when the text carries padding, and strip currency symbols, separators, or other characters that Excel does not recognize as part of a number, since the conversion rejects text it cannot read as one. The important prior question is whether the column should be numeric at all: an account code, postal code, or product ID with leading zeros is correctly text, and converting it destroys the zeros โ€” the reason imports of identifier columns are better set to text at the import step than repaired afterward.

References:


Discover more from Insightful Data Lab

Subscribe to get the latest posts sent to your email.

Similar Posts

Questions, corrections, or additional insights?

This site uses Akismet to reduce spam. Learn how your comment data is processed.