View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default Formating a cell(s)

On Wed, 8 Mar 2006 17:05:28 -0800, skarr
wrote:

When I go to the formatting, I click on number. I go back to the cell and put
in numbers, e.g. 8-12 or 1-5, when I click out of the cell after I entered
the number in it changes to 38,941. If I format to general, the number I
enter will change to a date. This did not happen before we updated to Office
2003.


Why do you think that 8-12 is a number? What part of the number is the "-"?

To me 8-12 is a string consisting of two numbers connected by a hyphen. Since
it could be a date, Excel interprets this as such.

If you want to type in 8-12 and see that in the cell, you need to preformat the
cell as Text, or precede the string with a single quote (which will not show up
in the cell, by the way). e.g. '8-12

As far as I know, this has always been true in Excel, certainly for the past
ten years or so.


--ron