Stop excel from converting copy-pasted number/text values to date
I'm copy-pasting some data from html table into excel. But excel automatically converts some text or number values to date! When I change the format, the number is perversed, the number is something like 4112523 (excel probably interprets the cell as date and then converts to number or something like that...)
There is a trick for importing CSV files, but is there any solution when you are pasting your data directly from a web browser?
Try this, it worked out for me:
Data - Import external data - New web query and follow the wizard
It's so simple.
regards!
This is definately a kluge and it's the only thing I've figured out to do. I came here looking for a more elegant solution.
I do have a slight improvement for this.
- Paste the data into the spreadsheet as is.
- Select all and format as text
- Paste again over what you did the first time but this time as values.
This keeps you from having to count columns and rows, etc.
If you have data you actually want to be numbers, dates, etc, it's much easier to reformat them correctly from this end than it is to do from the other. Since the numbers won't automatically convert, I used text to columns on the column, selecting "delimited" but unchecking all the delimiters. This has the same effect as going into each cell and hitting enter to get Excel to recognize it again. Ugly, but it works.
The Most simple way.
1. Copy the original Data
2. Paste to Notepad (Prefer Notepad++)
3. Change the Cell Properties to TEXT
4. Copy All from Notepad
5. Paste back to Excel.
Before pasting, select column that will hold the non-date value. Right click. Select 'format cells'. Then select 'text' as the format and click OK.
Now, go ahead and paste, but paste using the 'match the destination formatting' option.
- Open a Blank Workbook
- Click on Data
- Click From Text
- Locate your CSV/txt file
- Click Next
- Choose your Delimiter
- Click Next
- Use the scroll bar to locate the column you wish to protect and click on it
- Select Text from the Column data format
- Click Finish
- Click OK
The data will now have been imported without the date conversion.