ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formating a cell(s) (https://www.excelbanter.com/excel-worksheet-functions/76121-formating-cell-s.html)

skarr

Formating a cell(s)
 
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.

Ron Rosenfeld

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


All times are GMT +1. The time now is 12:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com