View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Why does Excel think this is a number?

Those commas without any spaces next to them look like and attempt to
include the thousands' delimiter in your number to Excel. Obviously they are
not in the correct places, but Excel is apparently "correcting" the mistake
it thinks you made. As it turns out, just including one comma anywhere in a
string of digits is sufficient to kick off this action on Excel's part. This
appears to be one of those cases where Excel is trying to be helpful, but
it's not.

--
Rick (MVP - Excel)


"EricG" wrote in message
...
I have a text string of 4-digit numbers separated by commas. When I paste
that string into a cell, Excel converts it to a number instead of
interpreting it as text. Can anyone explain why? I could understand if
it
were 3-digit numbers separated by commas, because that is a conventional
representation. Here is an example:

I paste in a string (without quotes) like:
"4235,4236,4237,4238,4246,4247,4248,4249,4250,4251 ,4252"

Excel turns it into a number like:
42,354,236,423,742,300,000,000,000,000,000,000,000 ,000,000

Interestingly, if I paste in:
"4235, 4236, 4237, 4238, 4246, 4247, 4248, 4249, 4250, 4251, 4252"

I get a text string and not a number. This does not happen in cells where
I
preformat the cell as Text, but does when the cell is General format.

Just curious,

Eric