How do I get formulae in a Writer table to display only non-zero results?

I have a table in Writer as part of an Invoice template, with formulae to calculate parts cost, labour cost and total. Currently, the column for the results of these calculations displays $0.00 if there is nothing on that line of the invoice. I would like it to display only non-zero results. Can I do this?

Merci, Pierre, but when I do this, the user defined format shows up in the Format box as -47tan18a190318, and when I highlight it the code shows up in the code box as (>0)StanDaRD,(<0)-StanDaRD,#, despite the fact that I have tried direct entry and copy and paste, with square and round brackets, with semi-colons and with commas.

Hi

You can use a number format like [>0]Standard;[<0]-Standard;#

In a number format code with three sections, the first section applies to positive values, the second section to negative values, and the third section to the value zero.

You should perhaps adapt the separator of your locale (in French it is the semicolon, it is perhaps the comma for you…)

To set the format:

  • Right click the cell▸Number Format
  • Type (paste) in the Format code box

You can test with this WriterTableSumIF.odt example: replace 0 by 1 in A2 then exit A2 (click elsewhere)

Regards