View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Phil A in the UK
 
Posts: n/a
Default How to prevent Excel converting imported fractions into dates

"CaptainQuattro" wrote:


One way to change the way Excel will treat this data is to select Tools,
Options, Transition.. and select Transition formula entry.

If you are simply copying your table to the clipboard and pasting into
excel, they will display as decimals, but the underlying fractions will
be preserved.


Yes, I am - see reply to ron. Thank you Captain Quatro, that method worked
fine, but only if I closed excel and re-opened a new sheet before setting
that option. Just changing the option and pasting into an empty 'sheet2' gave
the same error as before.

Another method would be to perform an interim step of copying your
table to a notepad plain text document. Save the notepad table as
something like table.txt and then use the

Data, get external data... wizard in excel. (In Excel 2003 this
function is named slightly differently, but is still under the Data
Menu)

Original Data type will be delimited
Click Next. Choose Tab as the delimiter
Click Next and for each column choose Text as the Column Data format.


Saving that web page in notepad produced space delimited columns, not tabs,
which is awkward as there are spaces already in the text, eg ' 1 1/4'
(=1.25), and '# 38'. Instead I pasted it into Word, converted the table to
text with tab delimiters, saved and then imported as per your method.

This resulted in a sheet that 'looked' the same as the web page data, but
was of course all text format. eg '1/16' was text not '0.0625' in the cell.
Hitting return in the cell converted this to '01/01/2016' which is where we
came in :-(.
I do want to do numerical work on the data so can't leave it in text format.

Your first method is the best solution for me, though I would like to make
the 'Transition formula entry' stick as the default option. At the moment it
seems to revert to unchecked for each new sheet.

Thanks very much for the workaround. Is there any way to get microsoft to
fix this wierd parsing as it does seem to be a bug to me?

Hope this helps.


Yes it did thank you.

Phil