I was working on a fairly complex (for me) formula, the formula was working a bit, but not quite right, I was trying various things that seemed like they might help, when suddenly the formula got turned into text, wrapped in its cell, and didn’t calculate. Undo did not make a difference. There was no leading single-quote character ("’") to remove, copying and pasting didn’t help. I was stuck. Tore my hair and cursed LibreOffice for hours.
Google searching came up with things from six and twelve years ago that didn’t quite help, but which eventually pointed me in the right direction.
It seems one of the things I had tried earlier to get the formula to work was formatting the column where the formulas were as TEXT. Turns out that is a GREAT BIG OOPS. After applying the format, the formula still calculates just fine. It’s only later, when I later made a change to the formula, in trying something else, that the glitch happened. When changing the formula, the new version gets written into the cell and that’s when it becomes Text, with no way back. So I’m looking, for hours, at what the specific change was, not at the formatting change that I tried hours before.
It kind of makes sense, and I still consider it a bug. If you have a bunch of blank cells that are formatted as Text and you start writing in them, everything will be formatted as text. And helpfully, so to speak, if you type numbers in those text cells, they will be entered as text. If you type a formula, it will be text, not calculated, AS IF you had started each cell with a single quote, but without that character actually being there. Is that actually helpful? I don’t know.
The real glitch is that if you apply that Text format to non-blank cells, and some of them have formulas, the formulas will still keep on calculating and displaying properly, so you don’t know yet that there’s anything amiss. It’s only when you make a change to a formula that suddently, because the cell is now being written (over the previous contents) that it becomes Text instead of remaining a formula. So the bug can become evident some long time after you actually made the change (formatting the cells as Text) that creates the problem.
At this point, nothing you do, type, or paste in that single cell will change the text back into a formula. UNDO does not undo it. Undo will revert your typing, but it does not undo the conversion of the formula to text because that’s not in your immediate change list, it’s way back in history somewhere. That’s what drove me crazy for hours. Changing the format of the cell to General won’t even do it – until you paste the formula into the cell again.
I have found similar problems stated, but no explanations. Does anyone have any alternate explanations? If so, I’d like to hear before I submit this to Bugzilla. My question is not:
“What’s going on, how do I fix it?”
But rather:
“Is my understanding correct or am I missing something fundamental about what’s going on here?”
As I said above, this may be intended behavior, but it creates serious problems that are hard to debug.