Using conditional formatting to change the number format

I would like to use conditional formatting to change the number format. I have created a Style that includes the number format I want. The conditional formatting only seems to take on the colour and not the number format. Is there a way to get conditional formatting to change the number format? Any help appreciated.

The conditional format style’s number format not taking precedence over the underlying hard number format attribute was a bug in older releases, fixed as of 6.3.4 and 6.4.0, see tdf#117715.

Two decimal places if = 100 (100.00)

Style = Accent Test

Calc - Style Accent Test.ods

Thanks @Hrbrgr for the quick answer. That worked but only with the underlying default format. As soon as I give the cell another Number format this overrides the Conditional format.

I’m not sure how to return the spreadsheet.

Using a style to give the format instead direct format, doesn’t work for you.

@mariosv using a style in the conditional formatting works until you allocate a number format. Then the number format takes priority over the conditional format. Colours remain as per conditional format.

As @mariosv writes, only use styles and no direct formatting.

If you want to upload a sample file, edit your initial question and use the “paper clip” icon to insert a file. Make sure that the file is reduced and anonymized as much as possible. Thank you.

As soon as I give the cell another Number format this overrides the Conditional format.

Are you working with .xlsx file format? What you describe only works with .xlsx. Using .ods file format, I could not manage to override any applied Conditional Formatting.

It looks like Ubuntu has not caught up on the 6.3.4 and 6.4.0. That explains it. Thanks for all the help.

Version: 6.0.7.3
Build ID: 1:6.0.7-0ubuntu0.18.04.10
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: gtk3;
Locale: en-GB (en_US.UTF-8); Calc: group

The Ubuntu LTS releases don’t catch up on newer software. There’s an Ubuntu LibreOffice PPA with more recent releases.