1
votes

I understand how to to color either the cell background or just the text, but I have not come across an example with both conditionally colored as Excel can do.

My requirement is to color the cell based on a value range and then make the text red/black/white based on a different metric. Ideally, if I could just override the 'smart black/white' text with red once and a while that would be nice.

Any examples of conditionally formatting both text and cell background at the same time out there?

1

1 Answers

0
votes

A typical solution is to create different calculated fields that conditionally contain text or null depending on the circumstances. They should be mutually exclusive, in that if one has a value, the others are null. Put all three fields on your text/label shelf, and format each one as desired - say with a different color. Null text does not display. So you would have red, black and white fields in your label all the time, but only one would have content and display.

Its a little annoying, and I wish there were easier ways to dynamically control formatting, but it works well and is pretty easy when there are just 2 or 3 variants.