Conditional cell css depending on the value of another cell

QuestionsConditional cell css depending on the value of another cell
Alberto asked 11 months ago

Conditional cell css depending on the value of another cell.

I have to change the background color of one cell if the value of another cell in other column is X.
Both cells are is the same row.

5 Answers
Abu Ghufran answered 11 months ago

This is manually done via JS code. Refer demos/appearance/conditional-format-ext.php

Alberto answered 11 months ago

Could you send me the full link?

Alberto answered 11 months ago

Hello,

Thank you so much for the info.
It has been really handy.

I have another question.
I want to set the background in red of a field that has a negative amount in €,
there are a couple of field like that I want to do the same for all of them.

I am having problem at the time that the conditional CSS tries to recognize the – symbol in the field.

Any solution?

Thank you

Abu Ghufran answered 11 months ago

In JS code, you can remove € sign first e.g. string.replace('€','') and then use parseInt to get numeric variable, which can be used in conditional formatting code.

Your Answer

15 + 17 =

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!