Version

ApplyFormula Method (WorksheetRegion)

Applies a formula to the region of cells.
Syntax
'Declaration
 
Public Sub ApplyFormula( _
   ByVal value As System.String _
) 
public void ApplyFormula( 
   System.string value
)

Parameters

value
The formula to parse and apply to the region.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionvalue is null or empty.
FormulaParseExceptionvalue is not a valid formula.
System.InvalidOperationException The region contains an array formula or data table which extends outside the region.
Remarks

value is parsed based on the CellReferenceMode of the Workbook to which the region belongs. If the region's Worksheet has been removed from its parent collection, the A1 CellReferenceMode will be used to parse the formula.

Requirements

Target Platforms: Windows 8.1, Windows 8.1, Windows 8, 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

View on GitHub