The ISTEXT function in Google Sheets returns TRUE if the input is a string and FALSE if not. A string is one of the data types available in Google Sheets. Other types include numbers, errors, and boolean values.
This function is beneficial when working with large datasets that contain different types of data, and you need to sort the text from the numbers, dates, or other values.
⚠ The ISTEXT function is case-insensitive, so it will return TRUE even if the text in the cell is in uppercase or lowercase letters.
value– The value that you want to check if it is text. This value can be a cell reference, a text string, or a number.
- 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 whether 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
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
"Hello" is a text string, and the second returns
123 is a number. The third example shows us the function can look at the value in another cell,
A1, in this case, and evaluate the contents of that cell.
In the following example, we will expand on the ability to look at another cell by nesting the ISTEXT function inside another function.
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:
=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.
The ISTEXT function is a powerful tool that can help you to work more efficiently with data in Google Sheets.