Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / ConditionalFormatting Class / CreateAboveAverage Method
The ConditionalFormattingStylePreset
Specifies if the formatting applies to Cells with values under the area's average value.
Specifies if the formatting applies to Cells with values equal to the area's average value.
Example


In This Topic
    CreateAboveAverage Method
    In This Topic
    Syntax
    'Declaration
     
    
    Public Shared Function CreateAboveAverage( _
       Optional ByVal styleType As ConditionalFormattingStylePresets, _
       Optional ByVal underAverage As Boolean, _
       Optional ByVal equalAverage As Boolean _
    ) As ConditionalFormattingAboveAverage
    'Usage
     
    
    Dim styleType As ConditionalFormattingStylePresets
    Dim underAverage As Boolean
    Dim equalAverage As Boolean
    Dim value As ConditionalFormattingAboveAverage
     
    value = ConditionalFormatting.CreateAboveAverage(styleType, underAverage, equalAverage)

    Parameters

    styleType
    The ConditionalFormattingStylePreset
    underAverage
    Specifies if the formatting applies to Cells with values under the area's average value.
    equalAverage
    Specifies if the formatting applies to Cells with values equal to the area's average value.
    Example
    ConditionalFormatting cf = ConditionalFormatting.CreateAboveAverage().AddArea( "A1", "C3" );
    doc.Worksheets[ 0 ].ConditionalFormattings.Add( cf );
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also