ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Format of a cell (https://www.excelbanter.com/excel-discussion-misc-queries/65313-format-cell.html)

profG

Format of a cell
 
I have a problem when I read the ":" colon as a separator from an excel or
text file that uses it as a separator.

the example I have is that when the colon separator is followed by a
number, say for example : 35, the number appears on the cell as 35:00:00
which is a time format.

It seems that Excel takes the separator as a time format for the cell and it
does not allow change of the cell's format not even to a simple text format.
Even when the formatting of the cell is changed to a general format it
generates a decimal number that is a multiplier of 24. If the value in the
cell is ": 24" and we format the cell as text it would show a"1" in it.

Is there a way the maintain the cell as a text formatted cell where the data
is maintained the same even if a colon is used as a separator?

In other words if ": 24 " is entered the cell should stay as ": 24" after a
text format is applied.



Dave Peterson

Format of a cell
 
Either preformat the cell as Text, then type in the value.

Or start your entry with an apostrophe: ': 24

If you're importing the file from a .txt file, then make sure you choose Text as
the format for that field.

If you're importing a file named *.csv, then rename it to *.txt and specify Text
for that field.

profG wrote:

I have a problem when I read the ":" colon as a separator from an excel or
text file that uses it as a separator.

the example I have is that when the colon separator is followed by a
number, say for example : 35, the number appears on the cell as 35:00:00
which is a time format.

It seems that Excel takes the separator as a time format for the cell and it
does not allow change of the cell's format not even to a simple text format.
Even when the formatting of the cell is changed to a general format it
generates a decimal number that is a multiplier of 24. If the value in the
cell is ": 24" and we format the cell as text it would show a"1" in it.

Is there a way the maintain the cell as a text formatted cell where the data
is maintained the same even if a colon is used as a separator?

In other words if ": 24 " is entered the cell should stay as ": 24" after a
text format is applied.



--

Dave Peterson


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

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