How to Prevent Excel from Auto-Converting String to Date

Copper Contributor

Hello. I have some product data with product codes like "07-2772", "12-2773" etc. If you type these strings in Excel, it'll automatically convert "07-2772" to Jul-72 and "12-2773" to Dec-73 as dates. I know I can add a single quote before string when entering. The file has thousands of rows of data. How can I make Excel stop doing this when I open the file? Thank you in advance. 

6 Replies

@DataSundowner 

Alternatively, format the cells as Text before entering data.

@Hans Vogelaar 

Thank you Hans. The problem is that I'm not entering data. I download the data from online and then directly open the file with data in it. When it opens, it automatically reads those data as dates. Any work around in this situation?

@DataSundowner

What kind of file is it? .csv, .txt, .xslx, ...?

@Hans Vogelaar 

It's downloaded as csv (only option), and I open it up in Excel.

@DataSundowner 

Instead of double-clicking the .csv file, open it from within Excel.

This should activate the Text Import Wizard.

In Step 3 of this wizard, you can specify that some columns must be treated as text.

@Hans Vogelaar 

Got it. Thank you for your help!