You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Numbers formula to change color?

is it possible to change color of cell or text via formula?


Color helps differentiates calculated value is NOT from TRUE but rather from FALSE part of IF statement.

Posted on Jun 8, 2022 1:06 AM

Reply
Question marked as Top-ranking reply

Posted on Jun 8, 2022 2:21 AM

Please have a look at this, you can use Conditional Highlighting to change the color / text style based on the value of a cell.

Use cell conditions in Numbers on Mac - Apple Support


Or search on YouTube for "conditional highlighting numbers"


Here some examples:




Hope this will help


Ralf

12 replies

Jun 8, 2022 4:39 PM in response to Sunnyintoronto123

Here is an example that uses two versions of the formula in column C.


Both are triggered by the TRUE or FALSE value in column A.


Both create the same value in the iftrue part, but diffeent values in the if false part.


The conditional highlighting rule compares the result in column C (the cell to be highlighted) with the value in the same row of column E.


If they are different, the formula sets "red text" as the highlight colour for that row's cell in column C. If they are the same, then both were created by the iftrue part of the formula in its cell, and the rule is not applied.


Column E may be hidden.


Regards,

Barry

Jun 9, 2022 2:11 AM in response to Sunnyintoronto123

You could do something like this.

Work with support cells

Cell B2 contains the formula that you would have in the true section of your IF formula, in this easy example: C2×D2

Cell B3 contains the formula that you would have in the false section of your IF formula, in this easy example: C3+D3

The IF formula in B4 is checking: Is D4 = 0, if yes take the value from B2 and if not take the value from B3


As soon as you add a Conditional Highlighting it will work, as long as B2 and B3 don't have the identical result in the calculation.


I have to agree with Barry the point with X = 0 and X * 5 is confusing.


Ralf

Jun 8, 2022 4:17 AM in response to Sunnyintoronto123

Can you give an example? There doesn't seem to be an IF statement in your screenshots so it is hard to know what you want.


A formula can determine the value in a cell but not the appearance of a cell. But the appearance of a cell can be set based on the value found in the cell, either through Conditional Highlighting or a script.


SG

Jun 9, 2022 1:05 AM in response to Sunnyintoronto123

"z is interpolation formula "


Do you mean "z represents an interpolation formula that is called if x is not equal to zero" or is the text "z" the result to be returned if x is not equal to zero.


In the formula as written,

IF x is zero, the result will be zero times 5, which is zero.

IF x is any other value, the result will be whatever value is determined by the formula z.


If z will never return a value of 0, you need only one CH rule:


Number is not 0 —> red text


Regards,

Barry

Numbers formula to change color?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.