The Problem:
You have a spreadsheet that has a column of what you think are numbers in it. The numbers display fine in their cells, but when you try to do something with them, you find that you can’t. For example, you may want to sort them or use them as part of a calculation and it doesn’t work. Here is a screenshot illustrating that the numbers look like numbers in their cells:
![apostrophe problem - 01 apostrophe problem - 01](https://www.ryananddebi.com/wp-content/uploads/2009/11/apostrophe-problem-01.png)
If you click on one of the cells, you’ll see that the numbers actually have a hidden apostrophe in front of them, like you see in this screenshot:
![apostrophe problem - 02 apostrophe problem - 02](https://www.ryananddebi.com/wp-content/uploads/2009/11/apostrophe-problem-02-300x76.png)
After spending some time on the internet, I finally found out what is going on. While you think those are numbers, the apostrophe is Calc’s way of saying that the numbers you see are to be treated as text, but they are in a cell that is formatted as a “number.” You can verify this by right-clicking on the cell, selecting “Format cells” and then clicking on the “Numbers” tab, as illustrated in the screenshots below:
![apostrophe problem - 03 apostrophe problem - 03](https://www.ryananddebi.com/wp-content/uploads/2009/11/apostrophe-problem-03-246x300.png)
![apostrophe problem - 04 apostrophe problem - 04](https://www.ryananddebi.com/wp-content/uploads/2009/11/apostrophe-problem-04-300x164.png)
So, the spreadsheet program treats a series of numbers as text in a cell formatted as numbers. Talk about aggravating.
The Solution:
There is a solution for this. It involves a “find and replace” function. From the “Edit” menu, choose “Find & Replace.” In the “Find” box, type “^.” (i.e., carat + period). In the “Replace” box, type “&” (without the quotes, of course). But you have to do one more thing for this to work. At the bottom of the “Find & Replace” window you’ll see a button that says “More Options.” Click on it, then select the box next to “Regular Expressions.” You should now have a “Find & Replace” box that looks like this:
![apostrophe problem - 05 apostrophe problem - 05](https://www.ryananddebi.com/wp-content/uploads/2009/11/apostrophe-problem-05-300x273.png)
Now, hit “Replace All” and all of your apostrophes will disappear. Your series of numbers will now be seen as numbers by your spreadsheet program and will be in cells formatted as number cells. Problem solved.
this doesn’t work for me, the search feature doesn’t find anything. I thought these were “invisible apostrophes”? Doesn’t that mean that they’re not search-able, as they’re not normal?
Did you choose “regular expressions” at the bottom of the find/replace box? If not, it won’t find them.
Also, from what I understand from the site where I got this, this doesn’t actually find and replace the apostrophes. What it actually does is recalculate all of the cells with numbers in them, turning them into numbers.
If it’s still not working, not sure what to tell you.
Thanks! I started a post on oOo forums and got help. This got me on the write track though, thanks!
Thanks a ton! I’ve been searching for 2 hours on this (not the apostrophe) and couldn’t find any help. Finally I noticed the ‘ in front of the numbers and started in with the searches. Found your first in google and can now stop pulling my hair out 😛
Hey, this worked great for us. Thanks
Hey, there is simpler solution.
Just select column with these numbers treated as text, choose Data -> Text to Columns.
Automagically, it converts them all to numbers.
But I didn’t find it myself, my wife did 🙂
Awesome. Thank you. that worked!
The original solution worked for me. but thanks for also sharing a slightly easier one (which also worked). but i did have to also change the “text delimiter” from a quotation mark (“) to an apostrophe (‘).
WOW AWESOME!!! It works!!!!
@Piotr
Thank you very much. I’m wondering what’s the purpose of that option. Nevertheless it worked like a charm.
I love you for this!!!! Thanks! 😀
Great solution, thanks!
Say, has anyone had trouble with apostrophes appearing not in front of but behind numbers? Again, the column says it is a number; however, no matter what I do, including the solutions above, the darn apostrophe keeps appearing when I enter a number in a blank cell. I can manually delete it, but what a pain.
Hi Kevin,
I’ve never run into this problem. Can you describe what you are doing to make it occur in greater detail?
Best,
Ryan
@Kevin
Hi Kevin,
I’ve never run into this problem. Can you describe what you are doing to make it occur in greater detail?
Best,
Ryan
Oh THANK YOU! This has been driving me completely bats! Worked like a charm 🙂
Bravo! This was wasting me an hour every week untill you solotuion worked 🙂 Now I can love Open Office again
Oh my Gosh. I’ve been trying to isolate the apostrophe itself. I’ve spent ~five hours on this, trying to learn regular expressions. This was all it took?! Thankyouthankyouthankyouthankyouthankyou
Hey! This helped me a lot!
My document has 850.000 lines with these invisible apostrophs.
Thank you.
You are awesome. Saved me forever.
This should be part of the FAQs on OpenOffice’s website.
Amazing. I consider myself a pretty good Googler / help file searcher. Just lucky my Google Fu turned up your site as the OpenOffice site and help files were no help.
Thank you so much for your very clear instructions! Two year old post and it still applies.
Thank you so much! This was driving me crazy!
You’re the man, Ryan! Saved me quite a few hours of monkey work. Thanks!
It is really infuriating how Calc simply ignores the column or cell properties (me forcing it to be ciphers or valuta) and keeps quoting certain numbers like 3.59
–> ‘3.59 but (most) others in the same column as ciphers the way I wanted them. Manually removing that heinous ‘ will turn 3.59 into 21610,00!!!! Even when carefully removing all digits, pasting them in notepad and pasting etc. won’t get rid of the %##%@! quotes so my calculations simply return 0. It really defies the whole purpose of Open Office if it is so fundamentally messing up in one of the bare essentials of a spreadsheet program. Why this ‘3.59 and ‘10.00 became to be text in stead of ciphers I’ll never know because the original CSV that was imported did not contain any aberrations in that column. Obviously it is an error in the import logarithms used and probably would qualify as ‘bugz’. Anyway, thanks for the tips that I have found here, it has indeed cleared those ridiculous (‘random’) quotes!!! I am glad that I did not have to waste hours on finding a how to. For your information my search engine query was: “open office how to delete quoted values”
You people are awesome. Thank you. This saved me a ton of work.
Ryan, Thank you very much for this. The last time I had this problem and searched for a solution I found nothing. Your clear, well illustrated advice makes the world a better place.
OMG. I love you. You just saved me hours of time. Thanks!
This might help someone too. I saw someone asking about if it’s AFTER the text. Well, I copied my credit card into calc and one column wouldn’t add. So I figured out that it’s text too just like the above problem, but in my case, no apostrophe. It’s a SPACE, and it’s AFTER the numbers, not before, so it’s not so easy to find. Solution: use find and replace. COPY the space from calc, and replace it with a 0 (zero) Now it will format like numbers. If you’re formatted for 2 decimal points, you won’t even see the extra 0 you added.
Great Solution! Thanks for saving me from a definite headache.
been looking for this for an eternity. thanks
THANK YOU 1000 times! You really saved me, I was doing ti manually and it was driving me crazy, thank you, thank you, thank you!
Thank you kind denizens of the web. This solved my ever so annoying ‘apostrophe’ problem just in time for tax season.
Thank you!! This will save me hours on my taxes. I’ve just spent 1/2 hour trying to solve this on my own. :p
Just what I needed. Thanks a bunch! 🙂
This was driving me nuts until I found this. Thanks for the headache relief!
You are a god!
You my friend, are a saint. Thank you so much for taking the time to share this and help others..gives me hope (and a working bloody spreadsheet…).
Arrrrgh! None of this is working here. When I remove apostrophes by any method, or use data>text to columns, all my dates turn into “###”
Any ideas?
@Dan
Are you having the problem outlined in this post? Or is your problem different? Do you want to send your spreadsheet to me?
Thanks a lot.It worked for me
Thanks! That was driving me crazy!
@NJBILLT thank you thank you!
You have officially saved my life!!! Thank you!!!!!
Worked like a charm. THANKS! 😉
@Scooter
Happy to help.
This is the most clear and concise instructional post I have ever read, and solved my aggravating problem in 1-minute. Thanks author!
Thank you! I thought my formula was messed up but it was really the hidden apostrophe. I appreciate it greatly.
Forgive me for looking a gift horse in the mouth, this saved me pulling out all my hair. With mine, it adds the apostrophe each time a check box is clicked. Best I can tell I have to do the find and replace each time the boxes are clicked. Has anyone found a more permanent solution?
@SkEyesOGrey
Hmm… Never seen the situation you’re describing. I wonder if it has to do with the programming behind the check box. If so, not sure how to fix that.
@Dan
Drag the column wider.
If you see crazy numbers instead of dates, right click on the column and change the number format to ‘date’ – it uses a wacky UNIX epoch type system for them if you view them as integers/floating point.
Thank you!
To SkEyesOGre (who said that an apostrophe gets added), have you first formatted the column to make sure it’s in the “Number” format?
Nice! It worked beautifully for me with a date field. I was totally stumped and you’ve saved me a ton of time. Thank you!
@Piotr
This solution worked great for me. Thanks a lot!
But don’t forget in Data -> Text to Columns to to check “other” as separator and to type ” ‘ ” (without the quotes) just next to this option.
Thanks Danke thanks thanks a lot!!!!
The text to columns suggestion worked and got rid of the apostrophes that were changing my numbers into text. However, after saving the file and reopening it, the apostrophes are back. Does anyone know if there’s a default setting that is causing this?
Thanks, first fix I have found that is immediate. A lot of the other Formatting suggestions have not worked.
I’ve wasted several hours trying to figure this out in calc. I finally googled the problem and you solution popped. It works. Thank you!
Mike I have only had this problem with date columns imported using csv files. This solution works for me. Highlight the entire column with the offending invisible apostrophe;
click on Data > Text to Columns > click OK
in the resulting dialog box. I have never changed the options in the Text to Columns dialog box but the apostrophes disappear. I then can format the dates as needed.
One further error I get is if the Default language is set to English(USA), I can’t format the entire column of dates as yyyy/mm/dd for import into the database unless I change the default language to English(UK).
@cmbmcn
Text to Columns solved it for me ! You have no idea how annoying this issue has been (maybe you have). Thanks!
Thank you so much!
Thank you!
Vielen Dank – many thanks. Just the hint i needed!
The work of all out there doing things like this is very much appreciated!
Many Thanks Dear… My Problem gets solved using your solution. Once again thanks
That worked a treat. I’ve been putting up with this issue for years. Now I know! Thanks a lot.
Thanks dear. This is exactly what i was looking for.
Thanks a lot!
THANK YOU!
I realize this is an older post, but just to update (without reading all the comments to see if it’s been suggested already…sorry) this solution:
Edit
Find & replace
(search for) ‘
(replace with) leave blank
Then I just clicked “replace all” and closed.
Problem solved.
Thank you for directing me to the right area and saving me tons of time by not needing to correct them individually…. (aargh..)!
Thank you! Don’t know how you figured it out but I have been saved many hours of work thanks to your posting this. Well done!
Thanks for sharing!
still a great tip, saved me a lot of manual entries. thanks!
Hi Ryan,
Thanks for this. Every year when I do my taxes and download the csv from paypal I always have this problem and always find your website with the solution. If there was a facebook like button I would click on it. It gets the thumbs up from me. Thank you.
Thanks a lot, its really helpfull 🙂
Great time saver. Thanks for posting this info.
For a long time have I put up with this issue and performed the long winded approach of removing each apostrophe one at a time – but I shall do it no more thanks to you! 🙂
Just an explanation of why the find and replace with “^.” and “&” works. A list of wildcards used in regular expressions in open office can be found at . Essentially, you are searching for the first character in every cell, and altering it if it is a format mark
You found this way back in 2009 and it’s still of use. Saved me a ton of time–thanks for sharing!
Awesome! Works well! Thank you for the solution.
Another Happy customer
It really helps! Thanks a lot!
Thank you for taking to the time to post a fix for this issue. Worked perfectly!
Even after four years, I am still able to find and use this great workaround. Thanks, saved me bacon 😉
Perfect, exactly what I was search for. It’s very important if you work with HLOOKUP (DE = SVERWEIS) and you’re getting #NV results. Mostly found with XLS files delivered from 3rd party sources.
THANK YOU!!!!!!!! This is so dumb and your solution worked perfectly!!
Cool!
Still need in Libre Office!
Awesome..Thanks a lot
Thanks a ton. This fix just saved me a ton of time!
This worked for me while Find & Replace did not. Thank you so much.
THANK. YOU. SO. MUCH.
thank you. it works
Beutiful Time saver formula. Thanks a lot
Thanks! Your solution helped me too!
Thank you!!!!!!!! I cannot thank you enough.Wow. You just saved me hours and hours of aggravation.
Aaah, finally a page that’s helpful! Thamx!
It took me over a week to find the problem (the apostrophe) and I finally came upon the solution via you! Thank you SO much. Now my accountant will love me again. 🙂
Nice to see a 5 year old blog is still helping others! You do BOMB! <3
add another grateful thanks. you save me a LOT of time!
It’s Works Thanks
Thank You!
wow…it works
Thanks buddy. This worked for me.
Sometimes, it really is worthwhile paying Microsoft for their Office suite.
I do have the licensed version of MS office, but its on my Laptop with windows and my simulations are in linux with lots of columns (~60-100) and lots of rows in each column (~10000) Libreoffice at least takes my data without whining on memory
I guess we cant have it bothways. Ohh well…
Anyways, thanks for this.
May God Bless you. Wish I could share a cup of coffee with you 🙂
Best,
Thanks Very Much Solved my problem immediately
Chetan Mahajan
Thaaaaank you! Great!
thank you. it save my work
Thank a lot Kra.
Extremely useful.
Great
Thank you
That’s exactly what I’ve been searching for. Huge thanks!
It works because it’s a regular expression.
^ means “at the beginning of the line”
. means any character.
so the “find” means to find the first character at the beginning of the line.
This is replaced with an ampersand, which is the hidden character signifying a number.
An apostrophe before a number tells Open Office to treat the number as text.
Thank you for the insight! I couldn’t figure out the meaning of the ampersand
Awesome!
This have been driving me crazy since installing Open Office on my Mac!
Now I don’t have to do either of my previous options which were a) edit them all out or b) not sort by date when merging spreadsheets!
Again, awesome!
Thanks
Just awesome. Works exactly as said. Thank you very much, it saved me! ¡Muchas gracias!
What worked for me: (I’m using Kingsoft Spreadsheets but I think this works universally though)
1) Copy entire column from spreadsheet
2) Open Notepad (NOT Wordpad)
3) Word-wrap should be OFF
4) Paste column into Notepad and save as damn_you_apostrophe.txt
5) Close Notepad and reopen
6) CTRL-A then CTRL-C to copy entire contents of Notepad
7) Paste in empty unformatted column in your favourite spreadsheet app.
8) Apostrophe’s GONE!!!
This took me only two days to discover LOL!!!
Update: works in Kingsoft, but not in Planmaker….sigh….
great thanks a loooooooooooooot
Awesome, thank you. Caused endless frustration for me to discover, what the hell is wrong with my calculations (which didn’t gave any result because that f***ing pointless apostrophe)
Thank you so much!
This issue was getting me seriously annoyed.
THANK
GOD
thank you !!!
Yee-ha! Thanks a bunch! This will save me from endlessly finding/replace-all to correct both dates and numbers (e.g. find/replace 04/ with 04/ in a date, etc.) to get rid of the bleeping apostrophe so I can sort and add columns.
BTW, today I managed to open one of those annoying files without the apostrophes by clicking some combination of boxes on the Text Import box that pops up when opening an Excel file. Unfortunately I haven’t been able to replicate what I did, but if I do I’ll try to remember to come back here and post the solution.
Another thing–another search result told me that selecting a column, choosing Data-Text to Columns, and clicking OK removes the apostrophes in that column. This only works one column at a time, but might feel more simple if you’re only dealing with one or two columns.
Thank you. This worked for me
I have been doing lots of this over the past week. My bet is that lots of people waste lots of time doing stuff like this. Keeps us slaves busy and not thinking dangerous thoughts. 😉
Hey, I discovered that you can forget all the paste specials and manual removal of the text tick by simply copying the column into Notebook and then back where it came from. Nice, yes? 🙂 Wish I’d thought of that sooner.
-NanoSteve-
Brilliant.
Many thanks….
Selecting “Detect Special Characters” worked for me
*I meant “Detect special numbers”
Thanks ! it worked
Thanks, very useful.
That was *amazingly* obtuse (the problem, not your solution).
Thank you, I was about to delete OpenOffice over this.
Awesome…… have been surging for hours to get a trick for that problem………….. Thank You Mister…….. Great Job!!!
I had the opposite problem. Lotus 123, save to xls, import to calc, dates are numbers but calc wants them as text (apostrophe) to use them in date calculations. Took me awhile to find that out, then how to add that apostrophe. Reverse above. find “^.” replace or replace all with “‘&” Options ‘Regular expressions’ ‘Selection only’ if needed.
THANKS FOR THE HINT
Another cheat I found. copy and paste numbers (text) into a document using Paste Special command and choose unformatted text. Then Copy and Paste back into your spreadsheet and there is a column of numbers to manipulate as normal.
Awesome thanks!
I know this is an ancient post by internet standards but this solution still works! Thanks for saving me a big headache!
Wow great find. Kudos.
Thankyouu!!
You’re a life saver! Many thanks.
Thanks a lot. Saved me time!
Thanks a lot! It works well.
Magic Right in front of my eyes
Thanks
great thanks
thanks it’s working.
thanks that worked but I wanted to do it from a cell formula so what I did was if A1 had ’01/01/1990 for example, I typed in A2: =A1+0 and then used date as the format for that cell…
Thanks so much for that and your down to earth explanation! It’s about time the programmers of this stuff stop trying to be so damn clever and make things practical and truly logical. My ‘ came in with a Paypal download in the date and time fields. Nearly went mad trying to sort my records in reverse date order. All okay now thanks to your knowledge thanks once again 🙂
Thank you so, so much. Every year, come this time (tax return / accounts hell) I get stuck with this issue, and I’ve always found myself having to re-type all dates in a second column as nothing would sort. So you a complete genius and I now have to print off your solution and file it in seventeen different places (and stick it on the wall and write it on my computer keyboard somewhere) or I’ll go mad trying to find it again next year…
Massively grateful.
Thanks so much saved heeeps of work. We have told the bank help line who couldn’t help
So, did anyone here also get an error message first?
After following the above advice the following error message flagged up “search key not found”.
That error message would suggest that the software isn’t finding the hidden apostrophes. Are you sure you have numbers that are flagged as text with the hidden apostrophe?
Thanks! You saved a life today!
Thank you so much, this was exactly what I needed!
Thank you sooooo much!
Thank you! you are awesome. I was challenged and spent countless hours trying to change the asterick in front of my date column which had been saved as a text. I used this and it worked perfectly within seconds. TOTAL LIFESAVER!
thank you SOOOOOOO MUCHHH !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thank you very much! It saved me a lot of time.
Muchas Gracias!
Thank you so much!!!! One question how did you figure this out? It makes no sense and is a combination I wouldn’t have come up with in a million years.
Brilliant! Thank you!
Thank you for this!!! Works fine in open office too.
I used this tip to successfully convert text to date-formatted numbers in a 9,950 row spreadsheet, fixing a problem with date sorting in an ODB file based on the spreadsheet. Thank you very much for writing up the regex instructions!
Both the ‘find and replace’ and the ‘Data -> Text to Columns’ solutions work in LibreOffice too. Thank you!
Thank you
Paul
THANK YOU SO MUCH!!! I WAS DOING IT MANUALLY AND IT WAS SO TEDIOUS!!
Thank you, it works!
You rock, Ryan! Saved my butt. Have 4000 records over 70 sheets, so have to have a bulk solution.
(Man, this is the tip that keeps on giving, eh? 12 years and still going strong!)
It works! Your solution keeps on giving for many years. May you receive total consciousness upon your death.
You are a STAR!!!
Thanks so much for posting this. I’ve spent the last hour trying to solve this and your solution worked a treat for me! Ta!
Great post, 15 years later it is still helping people!
I had a clumsy workaround but it wasn’t nearly as quick as your and some posters suggestions.
Alan,
Seattle
Amazing Help! Thank you!! I had so much trouble with this last year & had to look it up again. I found this. The “Text to columns” trick works so fast & easy.