# Condition element

Contains a condition and the formatting that is applied to a cell when the condition is true.

## Usage

    <Condition
    	Style="xsd:string"
    	Style="xsd:string"
    />

## Element Information

Element type | Anonymous
Namespace | urn:schemas-microsoft-com:office:excel
Schema name | XML Spreadsheet 2000

## Elements and Attributes

### Parent Elements

Element | Description
--- | ---
ConditionalFormatting | Contains information about conditional formatting.

### Child Elements

Element | Description
--- | ---
Qualifier | Contains the qualifier of a condition in conditional text formatting and data validation.
Value1 | Contains a text string specifying the value or formula used in conditional text formatting.
Value2 | Contains a text string specifying the value or formula used in the second part of conditional text formatting.
Format | Specifies the text formatting that is applied to a cell when the condition is true.

### Attributes

Attribute | Type | Required | Description | Possible Values
--- | --- | --- | --- | ---
Style | xsd:string | required | A text string containing attributes that describe the font weight, style, and effects that are applied when a qualifying condition is true. | See external namespace.
Style | xsd:string | optional | A text string containing attributes that describe the font weight, style, and effects that are applied when a qualifying condition is true. | See external namespace.

## Definition

    <xsd:element name="Condition" maxOccurs="3" >
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="Qualifier" minOccurs="0">
            <xsd:simpleType>
              <xsd:restriction base="xsd:string">
                <xsd:enumeration value="Between" />
                <xsd:enumeration value="NotBetween" />
                <xsd:enumeration value="Equal" />
                <xsd:enumeration value="NotEqual" />
                <xsd:enumeration value="Greater" />
                <xsd:enumeration value="Less" />
                <xsd:enumeration value="GreaterOrEqual" />
                <xsd:enumeration value="LessOrEqual" />
              </xsd:restriction>
            </xsd:simpleType>
          </xsd:element>
          <xsd:element name="Value1" type="xsd:string">
          </xsd:element>
          <xsd:element name="Value2" type="xsd:string" minOccurs="0">
          </xsd:element>
          <xsd:element name="Format" minOccurs="0">
            <xsd:complexType>
              <xsd:attribute name="Style" type="xsd:string" use="required">
              </xsd:attribute>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="Style" type="xsd:string" use="optional">
        </xsd:attribute>
      </xsd:complexType>
    </xsd:element>

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp