close

I have a csv file that includes a column that contains text in the format
1-2-14. These are not dates, they are text and must remain in that format. I
have tried importing, pasting, everything I can think of (including the
obvious cell formatting) with no luck. They are converted into dates and I
can't get them back into the right format. Can anyone help?

Thanks in advance
Mike

One way would be to do a Find$Replace on the file before importing to replace
all hyphens with doublehyphens.....(replace - with --)...........then change
back after importing if you wish..........Vaya con Dios,
Chuck, CABGx3
quot;Mikequot; wrote:

gt; I have a csv file that includes a column that contains text in the format
gt; 1-2-14. These are not dates, they are text and must remain in that format. I
gt; have tried importing, pasting, everything I can think of (including the
gt; obvious cell formatting) with no luck. They are converted into dates and I
gt; can't get them back into the right format. Can anyone help?
gt;
gt; Thanks in advance
gt; Mike

Well, I am not sure if this will help when it's already been imported:
vbaexpress.com/kb/getarticle.php?kb_id=138
************
Hope it helps!
Anne Troy
www.OfficeArticles.com

quot;Mikequot; gt; wrote in message
news
gt;I have a csv file that includes a column that contains text in the format
gt; 1-2-14. These are not dates, they are text and must remain in that format.
gt; I
gt; have tried importing, pasting, everything I can think of (including the
gt; obvious cell formatting) with no luck. They are converted into dates and I
gt; can't get them back into the right format. Can anyone help?
gt;
gt; Thanks in advance
gt; Mike
Mike,
Since the data have already been converted, maybe you can try something
like:
=DAY(a1)amp;quot;-quot;amp;MONTH(A1)amp;quot;-quot;YEAR(A1)-1900)

Does this help?
Kostis VezeridesI should let you know that the csv file itself has not been converted. If I
open it in notepad, the data is still intact. I just can't seem to view or
manipulate it in Excel.

quot;Mikequot; wrote:

gt; I have a csv file that includes a column that contains text in the format
gt; 1-2-14. These are not dates, they are text and must remain in that format. I
gt; have tried importing, pasting, everything I can think of (including the
gt; obvious cell formatting) with no luck. They are converted into dates and I
gt; can't get them back into the right format. Can anyone help?
gt;
gt; Thanks in advance
gt; Mike

Rename the csv file to .txt, then in Excel do File | Open and point to
the .txt file. This will automatically take you into the File Import
Wizard, where you will be able to specify in the 3rd panel which
field(s) you want to import as text (or dates etc).

Hope this helps.

Pete

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()