单元格值的条件格式规则 – 绝对值

我正在使用Excel 2013。

我在单元格上使用条件格式。 我已经使用function区上的高亮单元格规则选项添加了3条规则。

我的单元格包含一个公式。 在另一个单元格中是一个容许值的值,让它调用这个值。

我目前的条件格式做下面,这是工作正常,

If my cell is less than tol * 0.8 then colour it green If my cell is between tol * 0.8 & tol * 0.9 then colour it yellow If my cell is greater than tol * 0.9 then colour it red 

然而我的细胞价值可能是负面的,我只关心我的细胞的绝对值。 当负面的我的规则将颜色绿色可能不正确,请参阅下面的一个简单的例子。

 My Cell Tolerance Level Outcome I want My Current Result 75 100 Green Green 85 100 Yellow Yellow 95 100 Red Red -75 100 Green Green -85 100 Yellow Green -95 100 Red Green 

编辑

我不能让我的细胞价值绝对。 需要看到它的消极

只需为负值添加相同的格式即可

  If my cell is between tol * -0.79 & tol * 0.79 then colour it green If my cell is between tol * 0.8 & tol * 0.9 then colour it yellow If my cell is greater than tol * 0.9 then colour it red If my cell is between tol * -0.8 & tol * -0.9 then colour it yellow If my cell is less than tol * -0.9 then colour it red 

根据公式创build三条规则; 每个使用ABSfunction 。

 =ABS(cell/tol)<0.8 'for green =AND(ABS(cell/tol)>=0.8, ABS(cell/tol)<=0.9) 'for yellow =ABS(cell/tol)>0.9 'for red 

例子:

 =ABS($A2/$B2)<0.8 =AND(ABS($A2/$B2)>=0.8, ABS($A2/$B2)<=0.9) =ABS($A2/$B2)>0.9 

公差水平