ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Stop numbers converting to dates. (https://www.excelbanter.com/excel-worksheet-functions/19647-stop-numbers-converting-dates.html)

biglar85012

Stop numbers converting to dates.
 
How do I stop a number from being converted to a date? Example: When I
enter the number 02-08 it automatically converts to "Feb-8". I have tried
formating the cell as a number, but the date conversion overrides the
formating and makes it a date. I have tried entering the number as text, but
then have trouble sorting.

I realize that enter a digits from 1 thru 12 with a hyphen causes the date
conversion. How do I TURN IT OFF?

Peo Sjoblom

You need to use text format either by formatting ahead of entry or precede
it with an apostrophe
then you can use a formula that will extract the necessary numbers and use
that help column of formulas to sort by (can be hidden) There is no way to
turn off Excel date conversion and the other option would be text since the
string 02-08 is a text string

--
Regards,

Peo Sjoblom


"biglar85012" wrote in message
...
How do I stop a number from being converted to a date? Example: When I
enter the number 02-08 it automatically converts to "Feb-8". I have tried
formating the cell as a number, but the date conversion overrides the
formating and makes it a date. I have tried entering the number as text,
but
then have trouble sorting.

I realize that enter a digits from 1 thru 12 with a hyphen causes the date
conversion. How do I TURN IT OFF?




bj

if all you need is the display to have a hyphen, you can format the cell with
<format<cells
select <custom and enter as type
00-00
You can play with the format to make it display what you want. this treats
a 4 digit number as just a four digit number even though it displays with the
hyphen.

"biglar85012" wrote:

How do I stop a number from being converted to a date? Example: When I
enter the number 02-08 it automatically converts to "Feb-8". I have tried
formating the cell as a number, but the date conversion overrides the
formating and makes it a date. I have tried entering the number as text, but
then have trouble sorting.

I realize that enter a digits from 1 thru 12 with a hyphen causes the date
conversion. How do I TURN IT OFF?



All times are GMT +1. The time now is 10:11 AM.

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