Ask Your Question
0

Using conditional formatting to change the number format

asked 2020-05-11 20:30:35 +0100

Vez gravatar image

updated 2020-08-09 20:11:36 +0100

Alex Kemp gravatar image

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.

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
2

answered 2020-05-12 18:32:24 +0100

erAck gravatar image

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.

edit flag offensive delete link more
1

answered 2020-05-11 21:02:44 +0100

ebot gravatar image

updated 2020-05-11 21:02:58 +0100

Two decimal places if = 100 (100.00)

Style = Accent Test

C:\fakepath\Calc - Style Accent Test.ods

edit flag offensive delete link more

Comments

Thanks @ebot 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.

Vez gravatar imageVez ( 2020-05-11 21:18:36 +0100 )edit

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

m.a.riosv gravatar imagem.a.riosv ( 2020-05-11 21:47:49 +0100 )edit

@m.a.riosv 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.

Vez gravatar imageVez ( 2020-05-11 22:27:54 +0100 )edit
1

As @m.a.riosv 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.

ebot gravatar imageebot ( 2020-05-12 08:22:57 +0100 )edit
1

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.

Opaque gravatar imageOpaque ( 2020-05-12 11:34:57 +0100 )edit
0

answered 2020-05-13 18:37:15 +0100

Vez gravatar image

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

edit flag offensive delete link more

Comments

1

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

erAck gravatar imageerAck ( 2020-05-14 01:20:34 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-05-11 20:30:35 +0100

Seen: 107 times

Last updated: May 13