Click here for important information about Computing.net.

Excel Excel 2007 home and student

What formula should I use to color a cell green if cell a is less than 75% of cell b; and color another cell orange if a is greater than 75% of b but less tha 100%; and color another cell red if a is greater than B

Hi, Use conditional formatting to select the cell's color based an a formula. The formula tests the relationship between cells a and b in your example, and returns one or other of the logical values TRUE or FALSE.

From the Ribbon select Home - Styles - Conditional Formatting,

From the drop down select 'Manage Rules' and select 'New Rule'

In the dialog box select the last item in the list 'Use a formula to determine which cells to format'

Enter the formula in the box that tests the relationship between cells a and b, using the IF function, such as=IF(A1>B1,TRUE,FALSE)

Note that TRUE and FALSE do not have double quotes - they are Excel's logical values true and false.

Click the format button and from the 'Fill' Tab select a red color, click OK'Applies to' will show the selected cell, and the 'Stop if True' box is checked.

Click Apply and OKRepeat for the other two cells with formulas that test for the 75% relationships.

You could also have all three tests in one cell just by adding more conditional tests. Then one cell will show green, orange or red depending on the relationship between a and b

Regards

Ask Your Question

Weekly Poll

Do you think Intel's new hybrid chips will better compete with Apple/ARM?

Yes (14) | ||

No (14) | ||

I don't know (15) |

Discuss in The Lounge

Poll History