Ask Your Question
0

"OR" in conditional formatting formula

asked 2020-01-29 15:04:38 +0100

Cantagril gravatar image

updated 2020-09-08 15:26:13 +0100

Alex Kemp gravatar image

Greetings,

I want to update the conditional formatting in my SS by adding an alternative cell value to an existing condition - e.g that if the input is either "1" OR "2" then the output is the same.

In the present case I have: Condition 1 Formula is $D3="IND" ( which determines that the output number is fixed to two decimal places)

I had thought that as I want the same condition to be applied to a different value in the same cell then I could use the "OR" operator in a formula rather than add a new condition. I have tried varying combinations and placement of "OR" but this doesn't work and instead messes up the formatting for the first value "IND". As I have a fair number of similar additions I would like to avoid having to duplicate all the conditions but it's not a major pain if it's not feasable.

Any help would be much appreciated

edit retag flag offensive close merge delete

Comments

Without mentioning what you tried nobody could tell where you failed, but

OR($D3="IND";$D3="<someothervalue>")

should do the job.

Opaque gravatar imageOpaque ( 2020-01-29 15:21:29 +0100 )edit

You are of course right.

I have tried what I understand to be the principal possibilites starting with the one you mention - which I believed should work but doesn't. The other two were out of desperation :-)

  1. OR($D3="IND";$D3="SHA")
  2. OR($D3="IND",$D3="SHA")
  3. ($D3="IND") OR ($D3="SHA")
Cantagril gravatar imageCantagril ( 2020-01-29 16:55:18 +0100 )edit

I have tested my proposal before posting (and of course it worked for me). So now it is time to upload an anonymized sample file, to find out why it doesn't work for you.

Opaque gravatar imageOpaque ( 2020-01-29 20:07:44 +0100 )edit

Please attach a sample file editing your question.

m.a.riosv gravatar imagem.a.riosv ( 2020-01-29 22:45:03 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2020-01-30 19:25:08 +0100

Cantagril gravatar image

I'm not sure quite why but once again, the culprit appoears to have been to do with Direct Formatting as my original formula (and Opaque's answer) are now working. I had an identical problem some months ago (see my question "Conditional Formatting problem after update") with the same solution, i.e clear direct formatting and then reinstate.

Once again, Many thanks Opaque!

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-01-29 15:04:38 +0100

Seen: 47 times

Last updated: Jan 30 '20