Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Text turns into date - how to stop?

I have a file that associates codes that look like dates (OCT26 for example)
with a Saints Day. When I export to excel via .csv, it looks like 26-Oct, and
if I then pull the cell over into another worksheet, I get the number date
code 40112. The column is defined as TEXT. I need to compare the codes to
the table via VLOOKUP, so I can disply the description in the report. Is
there anyway to tell Excel not to try to make this code a date? (I did try
the ' suggestion, but it doesn't work in this case).
Martha
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default Text turns into date - how to stop?

Hi,

When you come throught the import wizard, you can select the column of
concern and click the Text option.

If that doesn't work you can use a formula against the 41002 cell

=TEXT(C1,"MMMDD")

In fact you can write a formula such as

=VLOOKUP(TEXT(C1,"MMMDD"),G1:H100,2,FALSE)


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Martha" wrote:

I have a file that associates codes that look like dates (OCT26 for example)
with a Saints Day. When I export to excel via .csv, it looks like 26-Oct, and
if I then pull the cell over into another worksheet, I get the number date
code 40112. The column is defined as TEXT. I need to compare the codes to
the table via VLOOKUP, so I can disply the description in the report. Is
there anyway to tell Excel not to try to make this code a date? (I did try
the ' suggestion, but it doesn't work in this case).
Martha

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Text turns into date - how to stop?

If you import the .csv file using Data|Import external data (xl2003 menus),
you'll be able to specify that this field should be treated as text -- and excel
won't change it.

You could also rename the .csv file to .txt and use File|Open. You'll see that
familiar text to columns wizard where you can specify that the field should be
treated as text.



Martha wrote:

I have a file that associates codes that look like dates (OCT26 for example)
with a Saints Day. When I export to excel via .csv, it looks like 26-Oct, and
if I then pull the cell over into another worksheet, I get the number date
code 40112. The column is defined as TEXT. I need to compare the codes to
the table via VLOOKUP, so I can disply the description in the report. Is
there anyway to tell Excel not to try to make this code a date? (I did try
the ' suggestion, but it doesn't work in this case).
Martha


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Text turns into date - how to stop?

Shane - thank you so much! I'll try it. But one question, how do I make excel
open the file via the import wizard. It just opens to .csv immediately. Is
there a preference or something I can check? I have 2007.
Martha

"Shane Devenshire" wrote:

Hi,

When you come throught the import wizard, you can select the column of
concern and click the Text option.

If that doesn't work you can use a formula against the 41002 cell

=TEXT(C1,"MMMDD")

In fact you can write a formula such as

=VLOOKUP(TEXT(C1,"MMMDD"),G1:H100,2,FALSE)


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Martha" wrote:

I have a file that associates codes that look like dates (OCT26 for example)
with a Saints Day. When I export to excel via .csv, it looks like 26-Oct, and
if I then pull the cell over into another worksheet, I get the number date
code 40112. The column is defined as TEXT. I need to compare the codes to
the table via VLOOKUP, so I can disply the description in the report. Is
there anyway to tell Excel not to try to make this code a date? (I did try
the ' suggestion, but it doesn't work in this case).
Martha

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Text turns into date - how to stop?

By the way, I tested the vlookup and it worked perfectly!!! Thank you. Martha

"Shane Devenshire" wrote:

Hi,

When you come throught the import wizard, you can select the column of
concern and click the Text option.

If that doesn't work you can use a formula against the 41002 cell

=TEXT(C1,"MMMDD")

In fact you can write a formula such as

=VLOOKUP(TEXT(C1,"MMMDD"),G1:H100,2,FALSE)


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Martha" wrote:

I have a file that associates codes that look like dates (OCT26 for example)
with a Saints Day. When I export to excel via .csv, it looks like 26-Oct, and
if I then pull the cell over into another worksheet, I get the number date
code 40112. The column is defined as TEXT. I need to compare the codes to
the table via VLOOKUP, so I can disply the description in the report. Is
there anyway to tell Excel not to try to make this code a date? (I did try
the ' suggestion, but it doesn't work in this case).
Martha



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Text turns into date - how to stop?

I had thought of opening excel first and then loading it in, but after I sent
email - but I like the idea of changing the name to .txt best. I do know how
to change the format of fields in the wizard. Thank you. Martha

"Dave Peterson" wrote:

If you import the .csv file using Data|Import external data (xl2003 menus),
you'll be able to specify that this field should be treated as text -- and excel
won't change it.

You could also rename the .csv file to .txt and use File|Open. You'll see that
familiar text to columns wizard where you can specify that the field should be
treated as text.



Martha wrote:

I have a file that associates codes that look like dates (OCT26 for example)
with a Saints Day. When I export to excel via .csv, it looks like 26-Oct, and
if I then pull the cell over into another worksheet, I get the number date
code 40112. The column is defined as TEXT. I need to compare the codes to
the table via VLOOKUP, so I can disply the description in the report. Is
there anyway to tell Excel not to try to make this code a date? (I did try
the ' suggestion, but it doesn't work in this case).
Martha


--

Dave Peterson

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
How do I stop a toolbar that always turns on when I open Excel? Purge Thunder Setting up and Configuration of Excel 1 September 29th 08 11:53 PM
Date Turns Green 90-Days before the date shown in cell ajaminb Excel Worksheet Functions 7 September 28th 08 11:36 PM
Is it possible to get Excel to stop formatting text as a date? PeteeWJ Excel Discussion (Misc queries) 2 May 12th 08 06:28 PM
Text turns into #### Aurora Excel Discussion (Misc queries) 5 May 2nd 08 09:28 PM
How to stop text changing to date Abbi Excel Discussion (Misc queries) 2 June 7th 05 08:49 PM


All times are GMT +1. The time now is 05:42 AM.

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

About Us

"It's about Microsoft Excel"