Version

SetFormula(String) Method

Sets the formula for a named reference.
Syntax
'Declaration
 
Public Overloads Sub SetFormula( _
   ByVal formula As String _
) 
public void SetFormula( 
   string formula
)

Parameters

formula
The string containing the formula value.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionformula is null or empty.
System.ArgumentExceptionformula is not a valid formula. The inner exception will contain the FormulaParseException describing the reason the formula was not valid.
Remarks

The formula will be parsed using the CellReferenceMode of the Workbook to which the NamedReference is applied. If the NamedReference has been removed from its collection, the A1 reference mode will be used to parse the formula.

Requirements

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