WorksheetFunction.Text Method

Converts a value to text in a specific number format.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function Text ( _
    Arg1 As Object, _
    Arg2 As String _
) As String
'Usage
Dim instance As WorksheetFunction
Dim Arg1 As Object
Dim Arg2 As String
Dim returnValue As String

returnValue = instance.Text(Arg1, Arg2)
string Text(
    Object Arg1,
    string Arg2
)

Parameters

  • Arg1
    Type: System.Object

    A numeric value, a formula that evaluates to a numeric value, or a reference to a cell containing a numeric value.

  • Arg2
    Type: System.String

    A number format in text form in the Category box on the Number tab in the Format Cells dialog box.

Return Value

Type: System.String

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace