Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Unnecessary conversion

Hi All,

I have a normal XL file generated by an application as output. There are
cells in it containing decimal numbers stored as text, e.g. "5.2".
When Opening this file XL converts strings recognizable as a date to dates,
like 2007/5/2.
What can I do to keep the original string "5.2" or convert it to a real
decimal number?

Regards,
Stefi

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Unnecessary conversion

In your example, you could add the formula:

=MONTH(A1)+DAY(A1)/10

to another cell, assuming the date is in A1. However, if you have a
mixture of dates and strings/numbers, it might be better to do
something like:

=IF(A135000,MONTH(A1)+DAY(A1)/10,VALUE(A1))

and format the cell as General, then copy this down the column. If the
"number" has been converted to a date, then it is likely to be larger
than 35000 (if a recent date), so it converts it as above, if not then
it just turns it into a number.

Hope this helps.

Pete

Stefi wrote:

Hi All,

I have a normal XL file generated by an application as output. There are
cells in it containing decimal numbers stored as text, e.g. "5.2".
When Opening this file XL converts strings recognizable as a date to dates,
like 2007/5/2.
What can I do to keep the original string "5.2" or convert it to a real
decimal number?

Regards,
Stefi


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Unnecessary conversion

Thanks Pete,

I thought of this way, but hoped there is a simpler way! If there is no one,
I'll try something like that!

Regards,
Stefi

€˛Pete_UK€¯ ezt Ć*rta:

In your example, you could add the formula:

=MONTH(A1)+DAY(A1)/10

to another cell, assuming the date is in A1. However, if you have a
mixture of dates and strings/numbers, it might be better to do
something like:

=IF(A135000,MONTH(A1)+DAY(A1)/10,VALUE(A1))

and format the cell as General, then copy this down the column. If the
"number" has been converted to a date, then it is likely to be larger
than 35000 (if a recent date), so it converts it as above, if not then
it just turns it into a number.

Hope this helps.

Pete

Stefi wrote:

Hi All,

I have a normal XL file generated by an application as output. There are
cells in it containing decimal numbers stored as text, e.g. "5.2".
When Opening this file XL converts strings recognizable as a date to dates,
like 2007/5/2.
What can I do to keep the original string "5.2" or convert it to a real
decimal number?

Regards,
Stefi



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion of Multiple Currencies into USD and CHF (Swiss Francs) Rene Excel Discussion (Misc queries) 0 October 16th 06 08:35 PM
ascii conversion [email protected] Excel Discussion (Misc queries) 4 September 17th 06 09:38 PM
Excel file conversion RCPhinney Excel Discussion (Misc queries) 1 August 16th 06 11:46 PM
how to maintain hyperlink in excel to pdf conversion majeed New Users to Excel 1 May 21st 06 11:18 AM
Curency Conversion Dilemma Michael Excel Worksheet Functions 5 May 27th 05 02:28 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"