Font color based on value

I'm a home user without a lot of spreadsheet experience.

I have a graph with several lines. I'd like line 1 set so that when I enter
a value in the box, that value would stay black if between an upper and
lower limit (e.g. 50-100) and to change to a red font if outside that limit.
Then line 2 would have a different set of limits as would line 3.

Is this possible to automate? I'm doing it by hand right now.

Sorry, I ment to insert an image.

The red at the top is just a reminder to me of what the limits are.

<http://nabble.documentfoundation.org/file/n4136261/23.png>

I might as well add the chart too. You can see the mean average of the red
graph at 184 (currently).

<http://nabble.documentfoundation.org/file/n4136262/07_PM.png>

I'm a home user without a lot of spreadsheet experience.

No worries!

I have a graph with several lines. I'd like line 1 set so that when I enter a value in the box, that value would stay black if between an upper and lower limit (e.g. 50-100) and to change to a red font if outside that limit. Then line 2 would have a different set of limits as would line 3. Is this possible to automate?

Sorry, I meant to insert an image. The red at the top is just a reminder to me of what the limits are.

I might as well add the chart too. You can see the mean average of the red graph at 184 (currently).

Your first image is of a range of cells but you start by referring to a chart. If you are talking about setting the colour of lines on a chart, I don't see any way to automate that.

But I'm guessing that you want the values you enter in cells (not "boxes") to assume different text colours depending on their values. That's possible.

o Select each range of cells to which you want this aspect to apply and go to Format | Conditional Formatting... . "Color scale" will give you background colours, but for text colours you probably need Condition.
o Set the required conditions for data values.
o Select cell styles appropriately - either from existing styles or using the New Style facility to create them on the fly. Text colour is selected on the Font Effects tab of the Cell Style dialogue.

Note that - as you require - you can set different conditions for different ranges of data cells, reusing existing cell styles or creating new ones as preferred.

I trust this helps.

Brian Barker

Hi Emil,

The red at the top is just a reminder to me of what the limits are.

Sounds like you want conditional formatting :

https://help.libreoffice.org/Calc/Applying_Conditional_Formatting

http://www.techrepublic.com/blog/diy-it-guy/diy-conditional-formatting-in-libreoffice-calc/

Alex

Thanks! For others, I've screen captured one set of conditions to show what I did. I had to set the lower limit to include ABOVE 1 so that empty cells wouldn't turn red. I also set a style for normal entries to ensure they didn't change color somehow.