Excel ISTEXT Function

The Excel ISTEXT function tests a specified value (cell) if it's a text value and returns TRUE if it's a text value or FALSE if it's not a text value

Example: Excel ISTEXT Function

Excel ISTEXT Function

METHOD 1. Excel ISTEXT Function

EXCEL

=ISTEXT(B5)
Result in cell C5 (TRUE) - returns TRUE given cell B5 is a text value.

=ISTEXT(B6)
Result in cell C6 (FALSE) - returns FALSE given cell B6 only comprises numeric values.

=ISTEXT(B7)
Result in cell C7 (TRUE) - returns TRUE given cell B7 comprises text and numeric values therefore it is treated as text value.

=ISTEXT(B8)
Result in cell C8 (FALSE) - returns FALSE given cell B8 is blank and therefore isn't treated as a text or a numeric value.

=ISTEXT(B9)
Result in cell C9 (FALSE) - returns FALSE given cell B9 is a date and is treated as a numeric value.

METHOD 2. Excel ISTEXT function using the Excel built-in function library

EXCEL

Formulas tab > Function Library group > More Functions > Information > ISTEXT > populate the input box

=ISTEXT(B5)
Note: in this example we are populating all the Value input box associated with the ISTEXT function.
Built-in Excel ISTEXT Function

METHOD 1. Excel ISTEXT function using VBA

VBA

Sub Excel_ISTEXT_Function()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("ISTEXT")

'apply the Excel ISTEXT function
ws.Range("C5") = Application.WorksheetFunction.IsText(ws.Range("B5"))
ws.Range("C6") = Application.WorksheetFunction.IsText(ws.Range("B6"))
ws.Range("C7") = Application.WorksheetFunction.IsText(ws.Range("B7"))
ws.Range("C8") = Application.WorksheetFunction.IsText(ws.Range("B8"))
ws.Range("C9") = Application.WorksheetFunction.IsText(ws.Range("B9"))

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Range: The Range object is a representation of a single cell or a range of cells in a worksheet.
PREREQUISITES
Worksheet Name: Have a worksheet named ISTEXT.

ADJUSTABLE PARAMETERS
Output Range: Select the output range by changing the Range references ("C5") through to ("C9") in the VBA code to any cell in worksheet that doesn't conflict with the formula.

METHOD 2. Excel ISTEXT function using VBA with a For Loop

VBA

Sub Excel_ISTEXT_Function()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("ISTEXT")
'apply the Excel ISTEXT function
For x = 5 To 9

On Error Resume Next
ws.Cells(x, 3) = Application.WorksheetFunction.IsText(ws.Cells(x, 2))
Next

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Range: The Range object is a representation of a single cell or a range of cells in a worksheet.
PREREQUISITES
Worksheet Name: Have a worksheet named ISTEXT.

ADJUSTABLE PARAMETERS
Output Ranges: Select the output ranges by changing the For x values (5 to 9).
Output Range: Select the output column by changing the column number.

Usage of the Excel ISTEXT function and formula syntax

EXPLANATION

DESCRIPTION
The Excel ISTEXT function tests a specified value (cell) if it's a text value. If the cell is a text value the Excel ISTEXT function will return TRUE. Alternatively, if the cell is not a text value the Excel ISTEXT function will return FALSE.
SYNTAX
=ISTEXT(value)

ARGUMENTS
value: (Required) The value that is to be tested.