ISTEXT Function
Tests if a given value is a text string or not
Tests if a given value is a text string or not
The ISTEXT Function is categorized under Information functions. The function will test if a given value is a text string or not. If the given value is text, it will return TRUE, or else, FALSE.
In doing financial analysis, if we want a particular file to input text values only in a particular cell, using this function along with data validation will help us do that.
=ISTEXT(value)
The ISTEXT function uses only one argument:
As a worksheet function, ISTEXT can be entered as part of a formula in a cell of a worksheet.
To understand the uses of the ISTEXT function, let’s consider few examples:
Suppose we are given the following data:
As we see above, when we apply the ISTEXT formula, we get the result in the form of TRUE or FALSE.
Suppose we wish to allow only text to be entered in a particular cell. In such scenario, we can use data validation along with ISTEXT to get the desired results.
Using the data below:
We want only text to be entered in column C9:C12, so we apply data validation to the cells. The formula to be used would be =ISTEXT(B9).
How to apply this formula?
We need to go to Data tab. Under Data tab, click on Data Validation, then click on Validation criteria and select – Custom. Use a formula to determine which cells to format. For this example, we selected column B6:B10:
If we want, we can input an error message. Click on Input Message and type the message on the Input message box.
Now, click OK.
Now, Data validation rules are triggered when any user would add or changes a cell value. Cell references in data validation formulas are checked for rules defined in data validation.
The ISTEXT function returns TRUE when a value is text and FALSE if not. As a result, all text input will pass validation, but numbers and formulas will fail validation.
We will get the results below when we try to enter numbers:
We can also ensure valid text is entered by using ISTEXT with IF function. It can be done using a nesting formula. Suppose we use a form to be filled up by users. The form is being sent to various users. Now we want to ensure only names are entered in cell B3. For this, we will use the formula =IF(B3=””,”Enter Your Name”,IF(ISTEXT(B3),”Valid Name”,”Please Enter A Valid Name”)), as shown below:
Now if we try to input a number, we will get an error while a valid name will be accepted, as shown below.
Click here to download the sample Excel file
Thanks for reading CFI’s guide to important Excel functions! By taking the time to learn and master these functions, you’ll significantly speed up your financial analysis. To learn more, check out these additional resources:
To master the art of Excel, check out CFI’s FREE Excel Crash Course, which teaches you how to become an Excel power user. Learn the most important formulas, functions, and shortcuts to become confident in your financial analysis.
Launch CFI’s Free Excel Course now to take your career to the next level and move up the ladder!