Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LibreOffice Calc shows formulas in the cell instead of results

The LibreOffice Calc (version 6.3.4.2) shows the definition of the formula in the cell instead of executing the formula and displaying the result. What affects the behaviour?

I am starting to use LibreOffice (simple things; newbie).

enter image description here

Update: The original file came from Excel (.xlsx extension). The first row formula was typed manually. The formulas below were filled by dragging the bottom-right handle of the cell. I guess that it should behave similarly to Excel; tha is, the relative cell reference (here A3) should be updated when dragging the formulas to the cells below. Also from that I guess that the formula is treated as a plain text, not as a formula. How to fix that?

Update 2021-03-23: I do not know if it was in the old version; however 7.0 implements the hot-key Ctrl+` (Ctrl + backward accent (grave accent)) to switch the modes show formulas / show results. Try it. :)

like image 439
pepr Avatar asked Dec 11 '22 01:12

pepr


1 Answers

Try pnorton's answer first, but if that still doesn't fix it for you, then it might be because the cell where you entered the formula is formatted as "Text". To fix this, select the cell, then:

  • Format menu > Cells... > Numbers tab > Category: select Number (or any format other than Text).

IMPORTANT: You need to then re-enter the formula. The cell's content is technically still just text, so you need to force LibreOffice to re-interpret it as a formula. It's not enough to "recalculate" – it's not even enough to click in the formula bar and press enter. For example, you could do one of the following:

  • Copy the cell, then Edit > Paste Special > Paste Unformatted Text.

Or...

  • Click to edit the cell's formula, add a space at the end, delete the space, then press enter.

Before:

formatted as text

After:

formatted as number

(Works for me in LibreOffice version 6.3.6.2 for macOS.)

like image 112
Chris Tollefson Avatar answered Dec 27 '22 11:12

Chris Tollefson