Question

I have a Excel 2010 Sheet which contains some values.

I want to achieve the following in a specific Cell:

If the User changes the Value more than 50% make it red, more than 25% make it yellow, below make it green.

I tried achieving this with conditional formatting (3-color-scale) using a copy of that value that cannot be changed as a reference using the following formula for the red paint:

=ABS(Y10-BV10)/(BV10)>0,5

(where Y10 is the value that can be changed and BV10 contains the same value as a reference)

When trying to do this I receive the Error:

You cannot use relative references in Conditional Formatting criteria for color scales, data bars and icon sets

Any other way to achieve this? (I create the file myself by OpenXML and so could use fixed values in the formula instead but that seems to be a very dirty solution as this formatting should work for a few hundred cells)

Was it helpful?

Solution

Rather than using a colour bar, do the formatting manually using the formula you have used to change the colour. You'll just need to have 2 formats in order. The first saying if > 50%, the next being greater than 25%

OTHER TIPS

In a new conditional formatting rule, go to Use a formula to determine which cells to format option - http://office.microsoft.com/en-gb/excel-help/use-a-formula-to-apply-conditional-formatting-HA102809768.aspx

you will need separate formula for each color though - to achieve the desired effect, make sure the rules are either mutually exclusive or else in correct order (in Manage Rules... dialog - the most general rule should be on top if you don't check "Stop if True", but if you check those checkboxes then the most specific rule should be on top)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top