The ISTEXT function in Google Sheets determines whether a given input is a string. It returns TRUE if the value is text and FALSE if not. In Google Sheets, strings are one of the available data types, along with numbers, errors, and boolean values.
This function is especially useful when working with large datasets that contain a mix of different data types, and you need to sort the text from the numbers, dates, or other values.
⚠️ It is important to note that the ISTEXT function is case-insensitive, meaning it will return TRUE even if the text in the cell is written in uppercase or lowercase letters.
Contents
Syntax
=ISTEXT(value)
value
– The value to check. This value can be a cell reference, a text string, or a number.
Related Functions
- ISBLANK – Determines if a cell is empty
- ISDATE – Determines if a value is a valid date
- ISERROR – Determines if a value is an error
- ISERR – Determines if a value is an error other than #N/A
- ISNA – Determines if a value is an #N/A error
- ISFORMULA – Determines if a value is a formula (which TYPE cannot do)
- ISLOGICAL – Determines if a value is boolean
- ISNONTEXT – Determines if a value is not text
- ISNUMBER – Determines if a value is a number
- ISREF – Determines if the value is a valid reference
- ISTEXT – Determines if a value is text
- ISURL – Determines if a value is a valid website address
Examples
Example 1 – Checking Values With the ISTEXT Function
These first three examples pass one value to the function, and the function determines if they are text.
=ISTEXT("Hello")
// Returns TRUE=ISTEXT(123)
// Returns FALSE=ISTEXT(A1)
// Returns TRUE if cell A1
contains text and FALSE if it does not
The ISTEXT function gives a boolean value as the output, meaning there are only two possibilities – TRUE
or FALSE
.
The first example returns a value of TRUE, as "Hello"
is a text string. In contrast, the second example returns FALSE because 123
is a number. The third example shows us that the function can examine the contents of another cell, for instance, A1
, and evaluate its content.
In the following example, we will nest the ISTEXT function within another function to look at another cell.
Example 2 – Using ISTEXT With Other Functions
You can combine the ISTEXT function with other functions, such as the IF function, to create more complex conditional statements. For example, the following formula will return the word "Text"
if cell A1
contains text and the word "Not Text"
if it does not:
Formula used: =IF(ISTEXT(B1), "Text", "Not Text")
As you can see, the text string "Hello"
is text!
Live Example in Google Sheets
Make a copy of the template with the examples to use in your Google Drive.
Conclusion
The ISTEXT function is a powerful tool that helps you work more efficiently with data in Google Sheets by determining if a value is text.