Need help with a formula

Excel Excel 2007 home and student
March 9, 2010 at 04:51:27
Specs: Windows XP, 2G
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

See More: Need help with a formula

Report •

March 9, 2010 at 05:16:51

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


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 OK

Repeat 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


Report •
Related Solutions

Ask Question