When is a NUMBER not a NUMBER?

Numbers are values that we can do arithmetic operations on.

However, there are values that appear to be numbers, that, in reality, are not numbers. If, for instance, you have a value that needs leading zeros, because the length of the value is always the same, like a USPS ZIP Code, you are not working with a number; rather you have an IDENTIFIER.

IDENTIFIERS are values that may contain ALL numeric characters, but

  1. you will NEVER use these values mathematically,
  2. often they have a defined length and
  3. they are used to describe some entity.

Part Numbers, ZIP Codes, Invoice Numbers, Phone Numbers, Social Security Numbers, Employee Numbers are some examples of IDENTIFIERS as opposed to NUMBERS, and, as such, need to be stored as TEXT values rather than NUMERIC values.

Why is this distinction important?
Computers store NUMBERS in a significantly different way than TEXT.
Computers manipulate NUMBERS in a significantly different way than TEXT.
Have you ever had a column of TEXT and NUMBERS that you tried to SORT in Excel? Excel asks you how you want the values to be handled, because it can’t figure it out without your input. If you do a QUERY on a column containing TEXT and NUMBERS, you will be sadly disappointed with the results.

Excel gives you some “help” by offering Numeric Formatting for ZIP Codes, Phone Numbers and Social Security Numbers. I AVOID this “help” because I consider these type of values TEXT and not NUMBERS. By doing so, I avoid ambiguities and confusion in my downstream processing.

What to do:
Convert numeric IDENTIFIERS to TEXT using the TEXT() function.

If you are using Data > Import External Data > Import or Data > Text to columns, always choose TEXT, rather than GENERAL, for columns that contain IDENTIFIERS.

By the way, NUMBER FORMAT changes NOTHING in the underlying data!

3 Likes

Thanks. I’ve found myself frustrated with this peculiarity in how excel handles identifiers before, and I did not know about selecting the “TEXT” option in the data tab like you mentioned.