I need help cleaning some dirty data
March 18, 2009 11:34 AM
Subscribe
Excel-filter: Mysterious single-quotes that precede the data in each cell. How do I get rid of them?
I'm working with a spreadsheet that's several years old. I suspect that the spreadsheet was created from a CSV file initially, but it was done before my time so I don't know for sure. Every entry in the first two columns is preceded by a single-quote. I think this was originally to force the text into..well, text, format that is. However, this character is causing these entries to not match other entries with the same text, sans single quote, which is a big problem for me. Things I've tried to get rid of these annoying characters:
=Clean()
Text->Columns
Changing the format (text, number, etc)
=Right(A1, Len(A1)-1) //this one chops off the first real character and leaves the single quote
Find & Replace using a copy/pasted single quote from an afflicted cell
Example of afflicted data, copy/pasted right from the spreadsheet:
'10807268
Nothing has worked except manually editing the cell and removing the character. Since I'm dealing with upwards of 10k cells, I really don't want to do this manually. Haven't managed to come up with anything on Google either. I'm using Excel 2007, though the file is .xls (rather than 2k7's .xlsx).
I'm not very good with macros, but willing to try them if they'll help.
posted by ashirys to computers & internet (16 comments total)
4 users marked this as a favorite
posted by mullacc at 11:39 AM on March 18