ISNONTEXT Function in Excel

🌟 Part 1: Introduce

Definition: The ISNONTEXT function in Microsoft Excel is a built-in logical function that checks whether a given value is not a text string. It returns TRUE if the value is not a text string and FALSE if it is a text string.

Purpose: The main purpose of the ISNONTEXT function is to determine if a cell or value is not formatted as text. It is commonly used with other logical functions to validate data and perform conditional calculations based on the data type.

Syntax & Arguments:

syntax
=ISNONTEXT(value)
  • value: This is the value or cell reference you want to check if it is not a text string.

Explain the Arguments in the Function: The value The argument is mandatory and represents the cell or value you want to check if it is not a text string. The ISNONTEXT function evaluates this value and returns TRUE if it is not a text string and FALSE if it is a text string.

Return Value: The ISNONTEXT function returns either TRUE or FALSE.

  • TRUE: If the value is not a text string.
  • FALSE: If the value is a text string.

Remarks:

  • The ISNONTEXT function treats numeric values, dates, times, logical values (TRUE and FALSE), and empty cells as non-text values.
  • Understanding the difference between non-text and numeric values is important, as the ISNONTEXT function does not consider numbers as text.

🌟 Part 2: Examples 🌟

1️⃣ Example using ISNONTEXT with IF and CONCATENATE:

ABC
1
2NameAgeResult
3John30=IF(ISNONTEXT(B3), CONCATENATE(A3, ” is “, B3, ” years old”), “Invalid”)
4Alice
525

Explanation:

  • Name (column A) and Age (column B) in this Example.
  • In cell C3, we use the ISNONTEXT function to check if the value in B3 (Age) is not a text string.
  • Since B3 contains the numeric value 30, the ISNONTEXT function returns TRUE, and the IF function concatenates the text in cell A3 (“John”), the text ” is “, and the value in cell B3 (“30 years old”).
  • The result in cell C3 is “John is 30 years old.”
  • In cells C4 and C5, since both B4 and B5 are blank, the ISNONTEXT function returns FALSE, and the IF function displays “Invalid.”

2️⃣ Example using ISNONTEXT with IF and AVERAGE:

ABC
1
2Test 1Test 2Result
39085=IF(ISNONTEXT(B3), AVERAGE(A3:B3), “Invalid”)
475
580

Explanation:

  • In this example, we have two columns of test scores: Test 1 (column A) and Test 2 (column B).
  • In cell C3, we use the ISNONTEXT function to check if the value in B3 (Test 2) is not a text string.
  • Since B3 contains the numeric value 85, the ISNONTEXT function returns TRUE, and the IF function calculates the average of A3:B3 using the AVERAGE function.
  • The average of 90 and 85 is 87.5, so cell C3 displays 87.5.
  • In cells C4 and C5, since both B4 and B5 are blank, the ISNONTEXT function returns FALSE, and the IF function displays “Invalid.”

3️⃣ Example using ISNONTEXT with IF and COUNTA:

ABC
1
2Value 1Value 2Result
310TRUE=IF(ISNONTEXT(B3), COUNTA(A3:B3), “Invalid”)
420
530FALSE

Explanation:

  • We have Value 1 (column A) and Value 2 (column B) in this Example.
  • In cell C3, we use the ISNONTEXT function to check if the value in B3 (Value 2) is not a text string.
  • Since B3 contains the logical value TRUE, the ISNONTEXT function returns TRUE, and the IF function counts the number of non-blank cells in the range A3:B3 using the COUNTA function.
  • There are two non-blank cells (10 in A3 and TRUE in B3), so cell C3 displays 2 as the result.
  • In cells C4 and C5, since both B4 and B5 are blank, the ISNONTEXT function returns FALSE, and the IF function displays “Invalid.”

Certainly! Let’s continue with seven more examples (from 4 to 10) that utilize the ISNONTEXT function nested with various functions in different scenarios:

4️⃣ Example using ISNONTEXT with IF and VLOOKUP:

ABC
1
2CategoryAmountResult
3Food$50=IF(ISNONTEXT(VLOOKUP(“Food”, A3:B5, 2, FALSE)), B3, “N/A”)
4Travel
5Electronics$300

Explanation:

  • This Example shows a table of expenses with their corresponding categories and amounts.
  • In cell C3, we use the ISNONTEXT function to check if the VLOOKUP function (looking up the amount based on the search category “Food”) results in a non-text value.
  • Since the VLOOKUP function successfully finds the amount of $50 for the category “Food,” the ISNONTEXT function returns FALSE, and the IF function displays the value in cell B3 ($50) in cell C3.
  • In cell C4, the ISNONTEXT function returns TRUE since there is no value for the category “Travel.” The IF function displays “N/A” to indicate the absence of data.
  • In cell C5, the ISNONTEXT function returns FALSE again, and the VLOOKUP function finds $300 for the category “Electronics.” Therefore, cell C5 displays $300.

5️⃣ Example using ISNONTEXT with IF and CONCATENATE:

ABC
1
2First NameLast NameFull Name
3JohnDoe=IF(ISNONTEXT(A3), CONCATENATE(A3, ” “, B3), “N/A”)
4Alice
525Smith

Explanation:

  • We have First Name (column A) and Last Name (column B) in this Example.
  • In cell C3, we use the ISNONTEXT function to check if the value in A3 (First Name) is not a text string.
  • Since A3 contains the text “John,” the ISNONTEXT function returns FALSE, and the IF function concatenates the text in cell A3 (“John”) with a space and the value in cell B3 (“Doe”).
  • The result in cell C3 is “John Doe.”
  • In cell C4, the ISNONTEXT function returns TRUE again, and A4 is blank. The IF function displays “N/A” to indicate the absence of data.
  • In cell C5, both A5 and B5 are non-text values (numeric and text), and the ISNONTEXT function returns TRUE. The IF function displays “N/A” in cell C5.

6️⃣ Example using ISNONTEXT with IF and SUM:

ABC
1
2Value 1Value 2Result
39085=IF(ISNONTEXT(B3), SUM(A3:B3), “Invalid”)
4“75”
58075

Explanation:

  • In this example, we have two columns of values: Value 1 (column A) and Value 2 (column B).
  • In cell C3, we use the ISNONTEXT function to check if the value in B3 (Value 2) is not a text string.
  • Since B3 contains the numeric value 85, the ISNONTEXT function returns TRUE, and the IF function calculates the sum of A3:B3 using the SUM function.
  • The sum of 90 and 85 is 175, so cell C3 displays 175.
  • In cell C4, the ISNONTEXT function returns FALSE again, and B4 contains the text “75” (a text representation of a number). However, the SUM function treats “75” as a number and returns 75 as the result in cell C4.
  • In cell C5, both A5 and B5 are numeric values, so the ISNONTEXT function returns TRUE. The SUM function calculates the sum of 80 and 75, displaying 155 in cell C5.

7️⃣ Example using ISNONTEXT with IF and AVERAGE:

ABC
1
2Test 1Test 2Result
39085=IF(ISNONTEXT(A3), AVERAGE(A3:B3), “Invalid”)
4“75”
58075

Explanation:

  • In this example, we have two columns of test scores: Test 1 (column A) and Test 2 (column B).
  • In cell C3, we use the ISNONTEXT function to check if the value in A3 (Test 1) is not a text string.
  • Since A3 contains the numeric value 90, the ISNONTEXT function returns TRUE, and the IF function calculates the average of A3:B3 using the AVERAGE function.
  • The average of 90 and 85 is 87.5, so cell C3 displays 87.5.
  • In cell C4, the ISNONTEXT function returns FALSE again, and A4 contains the text “75” (a text representation of a number). However, the AVERAGE function treats “75” as a number and returns 75 as the result in cell C4.
  • In cell C5, both A5 and B5 are numeric values, so the ISNONTEXT function returns TRUE. The AVERAGE function calculates the average of 80 and 75, displaying 77.5 in cell C5.

8️⃣ Example using ISNONTEXT with IF and COUNTIF:

ABC
1
2CategoryAmountResult
3“Food”$50=IF(ISNONTEXT(A3), COUNTIF(A3:B3, A3), “Invalid”)
4Travel
5“Food”$30

Explanation:

  • This Example shows a table of expenses with their corresponding categories and amounts.
  • In cell C3, we use the ISNONTEXT function to check if the value in A3 (Category) is not a text string.
  • Since A3 contains the text “Food,” the ISNONTEXT function returns FALSE, and the IF function counts the occurrences of “Food” in the range A3:B3 using the COUNTIF function.
  • The COUNTIF function returns 1, as there is one occurrence of “Food” in A3, so cell C3 displays 1 as a result.
  • In cell C4, the ISNONTEXT function returns FALSE again, and there is no value for the category “Travel.” The IF function displays “Invalid” to indicate the absence of data.
  • In cell C5, the ISNONTEXT function returns FALSE once more, and there is another occurrence of “Food” in A5. The COUNTIF function returns 1, and cell C5 displays 1.

9️⃣ Example using ISNONTEXT with IF and MAX:

ABC
1
2Value 1Value 2Result
39085=IF(ISNONTEXT(A3), MAX(A3:B3), “Invalid”)
475
580“75”

Explanation:

  • In this example, we have two columns of values: Value 1 (column A) and Value 2 (column B).
  • In cell C3, we use the ISNONTEXT function to check if the value in A3 (Value 1) is not a text string.
  • Since A3 contains the numeric value 90, the ISNONTEXT function returns TRUE, and the IF function calculates the maximum value between A3 and B3 using the MAX function.
  • The maximum value between 90 and 85 is 90, so cell C3 displays 90.
  • In cell C4, the ISNONTEXT function returns FALSE again, and A4 contains the numeric value 75. The IF function calculates the maximum value between 75 and a blank cell, and the maximum is 75. Therefore, cell C4 displays 75.
  • In cell C5, the ISNONTEXT function returns FALSE again, and B5 contains the text “75” (a text representation of a number). However, the MAX function treats “75” as a number and returns 75 as the result in cell C5.

🔟 Example using ISNONTEXT with IF and SUBSTITUTE:

ABC
1
2TextFindResult
3Apple“p”=IF(ISNONTEXT(A3), SUBSTITUTE(A3, B3, “Pine”), “”)
4Orange
5“Banana”“a”

Explanation:

  • In this example, we have two columns: Text (column A) and Find (column B).
  • In cell C3, we use the ISNONTEXT function to check if the value in A3 (Text) is not a text string.
  • Since A3 contains the text “Apple,” the ISNONTEXT function returns FALSE, and the IF function applies the SUBSTITUTE function to replace the letter “p” (B3) with “Pine.” The result is “Apple” (replacing “p” with “Pine”).
  • In cell C4, the ISNONTEXT function returns FALSE again, and A4 contains the text “Orange.” However, since B4 is blank, the SUBSTITUTE function performs no replacements, and cell C4 displays “Orange” unchanged.
  • In cell C5, the ISNONTEXT function returns FALSE once more, and A5 contains the text “Banana.” The SUBSTITUTE function replaces the letter “a” (B5) with “Pine.” The result is “Bpinepn.”

1️⃣1️⃣ Example using ISNONTEXT with SUMIF:

ABC
1
2CategoryAmountResult
3“Food”$50=IF(ISNONTEXT(A3), SUMIF(A3:A5, A3, B3:B5), “N/A”)
4“Travel”
5“Food”$30

Explanation:

  • This Example shows a table of expenses with their corresponding categories and amounts.
  • In cell C3, we use the ISNONTEXT function to check if the value in A3 (Category) is not a text string.
  • Since A3 contains the text “Food,” the ISNONTEXT function returns FALSE, and the IF function calculates the sum of amounts in column B (Amount) where the category in column A matches “Food.” The SUMIF function performs this calculation.
  • The SUMIF function adds $50 and $30 (matching “Food” in A3 and A5, respectively), so cell C3 displays the sum, of $80, as a result.
  • In cell C4, the ISNONTEXT function returns FALSE again, and there is no value for the category “Travel.” The IF function displays “N/A” to indicate the absence of data.
  • In cell C5, the ISNONTEXT function returns FALSE once more, and A5 contains the text “Food.” The SUMIF function adds $30 (matching “Food” in A5), and cell C5 displays $30.

1️⃣2️⃣ Example using ISNONTEXT with IF and SEARCH:

ABC
1
2TextFindResult
3“Excel”“e”=IF(ISNONTEXT(A3), IF(SEARCH(B3, A3), “Found”, “Not Found”), “”)
4“Function”
5“Sheet”“a”

Explanation:

  • In this example, we have two columns: Text (column A) and Find (column B).
  • In cell C3, we use the ISNONTEXT function to check if the value in A3 (Text) is not a text string.
  • Since A3 contains the text “Excel,” the ISNONTEXT function returns FALSE, and the IF function proceeds to check if the letter “e” (B3) is found in the text “Excel.” The SEARCH function performs this check and returns the position of “e” in “Excel” (position 2).
  • Since position (2) is not zero, the IF function displays “Found” in cell C3.
  • In cell C4, the ISNONTEXT function returns FALSE again, and A4 contains the text “Function.” However, since B4 is blank, the SEARCH function performs no search, and cell C4 displays an empty cell.
  • In cell C5, the ISNONTEXT function returns FALSE again, and A5 contains the text “Sheet.” The SEARCH function searches for the letter “a” (B5) in “Sheet” and returns position 3.
  • Since position (3) is not zero, the IF function displays “Found” in cell C5.

These examples demonstrate various scenarios of using the ISNONTEXT function nested with other Excel functions, making it a powerful tool for handling different data types and improving data analysis and decision-making.

🌟 Part 3: Tips and Tricks 🌟

  • Use ISNONTEXT to validate data and ensure that numeric or non-text values are correctly processed in your calculations.
  • When working with formulas that involve text, use functions like ISNONTEXT to handle different data types effectively and avoid errors.
  • Be cautious when working with data imported from external sources, as formatting discrepancies can lead to unexpected results with ISNONTEXT. Always double-check the data type of your values.