Check if a Cell Contains Text
- 9 Comment
Excel provides an easy method to determine if a particular cell contains text. Using the IsText function will return True or False after checking the given cell. Let’s take a look at at how to use this function.
For this example, let’s imagine Cell A1 has the text “Red”, and Cell B1 contains the number 5. Using the IsText function would look like this:
- =IsText(A1) ; this function would return true because “Red” is text.
- =IsText(B1) ; this function would return false because 5 is a number.
This function can easily be used with other Excel functions to achieve your desired results. In this last example we use the results on the IsText function in an IF statement.
- =IF(IsText(A1),”This Cell Contains Text.”,”This Cell Does not have text.”) ; this function would return “This Cell Contains Text.”
- =IF(IsText(B1),”This Cell Contains Text.”,”This Cell Does not have text.”) ; this function would return “This Cell Does not have Text.”
There are numerous other similar functions built into Excel (such as isNumeric, ISBlank, ISNA and ISERROR) that work similarly to IsText. We will explore those at a later date.