Finance

Charts

Statistics

Macros

Search

How to use the ISTEXT function in Excel

Returns TRUE if the value is text (including numeric strings like « 123 »). Returns FALSE for numbers, errors, logical values, empty cells, or empty strings («  »).

Syntax

ISTEXT(value)

Key Behavior

Input Type ISTEXT Result Notes
Regular text TRUE « Apple », « 123 »
Empty cell FALSE
Number FALSE 100, 3.14
Boolean FALSE TRUE/FALSE
Error FALSE #N/A, #VALUE!
Empty string («  ») FALSE Result of formulas like = » »

Practical Applications

  1. Sales Tax Calculation (Text vs. Number)

Scenario: Column M contains either text (e.g., « Exempt ») or tax rates (e.g., 7%).

=IF(ISTEXT(M42); «  »; L42*M42)

  • Text in M42 → Returns blank («  »)
  • Number in M42 → Calculates L42*M42
  1. Data Validation (Text-Only Fields)

Restrict cell input to text:

  1. Select cell → Data → Data Validation → Custom
  2. Formula:

=ISTEXT(A1)

  1. Clean Mixed Data

Identify text entries in a column:

=IF(ISTEXT(B2), « Text », « Not Text »)

Special Notes

  1. Numeric Strings:
    • ISTEXT(« 100 ») → TRUE
    • ISTEXT(100) → FALSE
  2. Empty vs. Zero:
    • Blank cell → FALSE
    • Formula returning «  » → FALSE
  3. Counterpart:

ISTEXT(value) = NOT(ISNONTEXT(value))

Example Walkthrough

Problem: Calculate gross values where tax rates may be text (« Exempt ») or numbers (7%, 19%).

Solution:

=IF(ISTEXT(M42); ; L42*M42)

  • If M42 is « Exempt » → Skips calculation (returns blank)
  • If M42 is 0.07 (7%) → Multiplies by L42

Data Validation Setup:

  1. Create a list of valid inputs (e.g., « Exempt », 7%, 19%) in another sheet (e.g., column K).
  2. Apply to column M:
    • Data → Data Validation → List
    • Source: =$K$1:$K$3

Pro Tip

Combine with TRIM() to handle spaces:

=ISTEXT(TRIM(A1))  // Returns FALSE for cells with only spaces

0 0 votes
Évaluation de l'article
S’abonner
Notification pour
guest
0 Commentaires
Le plus ancien
Le plus récent Le plus populaire
Online comments
Show all comments
Facebook
Twitter
LinkedIn
WhatsApp
Email
Print
0
We’d love to hear your thoughts — please leave a commentx