L.2.2.14 Conditional Formatting

<conditionalFormatting sqref="H6:H11">
  <cfRule type="dataBar" priority="3" stopIfTrue="0">
    <formula>MAX(IF(ISBLANK(H6:H11), "", IF(ISERROR(H6:H11), "",
      H6:H11)))</formula>
    <formula>MIN(IF(ISBLANK(H6:H11), "", IF(ISERROR(H6:H11), "",
      H6:H11)))</formula>
    <dataBar minLength="10" maxLength="90" showValue="1">
      <cfvo type="min" val="0"/>
      <cfvo type="max" val="0"/>
      <color rgb="FF63C384"/>
    </dataBar>
  </cfRule>
</conditionalFormatting>
<conditionalFormatting sqref="G6:G11">
  <cfRule type="cellIs" dxfId="0" priority="1" stopIfTrue="0"
operator="greaterThan">
    <formula>0.5</formula>
  </cfRule>
</conditionalFormatting>

There are two conditional formats applied: one to the table of data in column H and the other to the table of data in column G.

In column G, a red fill is applied to any cell whose value is greater than 0.5. Notice that sqref specifies the range to which the rule applies. The formatting is specified by dxfId, which is a reference to a formatting expression in the central styles part.

In column H there is a dataBar formatting rule, which applies a variable length bar to the cell background, where the length of the bar depends on the relative value of the cell.

Last updated on