Conditional cell css depending on the value of another cell

QuestionsConditional cell css depending on the value of another cell
Alberto asked 6 years 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 6 years ago

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

Alberto answered 6 years ago

Could you send me the full link?

Alberto answered 6 years 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 6 years 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

18 + 13 =

Login with your Social Id:

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 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

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

Let us improve this post!

Tell us how we can improve this post?