Has Value in Excel? Find & Check

How-to basics · Updated November 23, 2026

Yes, the phrase “has value” in Excel most commonly refers to the ISNUMBER and ISBLANK functions, or the COUNTIF function, which check whether a cell contains a number, is empty, or meets a condition. For example, =ISNUMBER(A1) returns TRUE if A1 contains a number and FALSE if it contains text or is blank. This article explains every way to check if a cell “has value” in Excel, how to use the related functions, and how to avoid common pitfalls.

What “Has Value” Means in Excel

In everyday spreadsheet talk, “value” can mean three different things:

  • Any data at all – a cell that is not empty, whether it contains text, a number, a date, or a formula result.
  • A numeric value – a cell that contains a number (including dates and times, which are stored as numbers).
  • A specific value – a cell that equals a particular number or text you are looking for.

Excel has no single “HASVALUE” function. Instead, you combine functions like ISBLANK, ISNUMBER, ISTEXT, COUNTIF, and IF to test exactly what you mean by “has value.”

How to Check If a Cell Is Not Empty

To check if a cell has any content (text, number, or formula result), use the ISBLANK function inside an IF:

Assume cell A1 contains the value you want to test. In B1, enter:

=IF(ISBLANK(A1), "Empty", "Has value")

This returns “Has value” if A1 is not blank, and “Empty” if it is. Note that a formula that returns an empty string "" (like =IF(1=2,"","x")) is not considered blank by ISBLANK – it counts as having a value. If you want to treat such formulas as blank, use COUNTIF or a combination of LEN and TRIM.

Checking for Numbers vs. Text

If you specifically need to know whether a cell contains a number (not text), use ISNUMBER:

=ISNUMBER(A1)

This returns TRUE if A1 contains a number, date, or time (since those are stored as numbers), and FALSE if it contains text, a logical value (TRUE/FALSE), or is empty. For text, use ISTEXT(A1).

To label the result, wrap it in an IF:

=IF(ISNUMBER(A1), "Numeric", "Not numeric")

Checking If a Cell Equals a Specific Value

To test whether a cell contains a particular value (like “Yes” or 42), use the COUNTIF function or a simple comparison:

With A1 containing the value to test, use:

=IF(COUNTIF(A1,"Yes")=1, "Found", "Not found")

Or the shorter:

=IF(A1="Yes", "Found", "Not found")

For numbers, you can compare directly: =IF(A1=100, "Match", "No match"). Be careful with text: Excel comparisons are case-insensitive by default, so “yes” and “YES” are treated as equal.

Counting Cells That Have Values in a Range

When you need to know how many cells in a range are not empty, use COUNTA:

=COUNTA(A1:A10)

This counts all cells that are not empty, including text, numbers, and errors. To count only numeric values, use COUNT:

=COUNT(A1:A10)

To count cells that contain a specific value, use COUNTIF:

=COUNTIF(A1:A10, "Yes")

These functions are useful for dashboards and data validation summaries.

Common Problems and Misconceptions

1. Blank vs. Empty String – As mentioned, a formula that returns "" is not blank. If you import data and see “empty” cells that behave oddly, they may contain invisible spaces or empty strings. Use =TRIM(A1) to remove extra spaces, and check with =LEN(A1) to see the character count.

2. Cells with Spaces – A cell with a single space looks empty but is not. ISBLANK returns FALSE. To treat spaces as empty, use =IF(TRIM(A1)="", "Empty", "Has value").

3. Errors Count as Values – If a cell contains #N/A or #DIV/0!, COUNTA counts it as having a value. To exclude errors, use =COUNTIF(A1:A10, "<>") or =SUMPRODUCT(--(ISNUMBER(A1:A10))).

4. Case Sensitivity – COUNTIF and =IF(A1="text") are not case-sensitive. If you need case-sensitive matching, use EXACT in combination with SUMPRODUCT.

Alternatives and Advanced Methods

For more complex checks, you can use array formulas or newer functions:

  • ISLOGICAL – returns TRUE if the cell contains TRUE or FALSE.
  • ISERROR – returns TRUE if the cell contains any error value.
  • IFERROR – lets you replace errors with a custom message, which is useful when you want to treat errors as “no value.”
  • FILTER (Excel 2021/Microsoft 365) – can return only rows where a column has a value, e.g., =FILTER(A1:B10, A1:A10<>"").
  • LET (Microsoft 365) – lets you define a variable for cleaner formulas, e.g., =LET(v, A1, IF(ISBLANK(v), "Empty", "Has value")).

For conditional formatting, use “Format only cells that contain” with “Blanks” or “No Blanks” to highlight cells that have or lack values.

Frequently Asked Questions

Q: How do I check if a cell has any value in Excel?
Use =IF(ISBLANK(A1), "Empty", "Has value") to return a label, or simply =ISBLANK(A1) to get TRUE/FALSE. Remember that spaces and empty strings count as values.

Q: What is the difference between ISBLANK and COUNTBLANK?
ISBLANK tests a single cell and returns TRUE if it is truly empty. COUNTBLANK counts empty cells in a range. Both treat cells with empty strings as not blank.

Q: How do I count cells that contain numbers but not text?
Use =COUNT(A1:A10) to count numeric cells. For a more flexible count that ignores errors, use =SUMPRODUCT(--ISNUMBER(A1:A10)).

Q: Why does ISBLANK return FALSE for a cell that looks empty?
That cell likely contains a space, an empty string from a formula, or a non-printing character. Use =TRIM(A1) to clean it, or test with =IF(TRIM(A1)="", "Empty", "Has value").

Q: Can I check if a cell has a value in Google Sheets the same way?
Yes, the functions ISBLANK, ISNUMBER, and COUNTA work identically in Google Sheets. The main difference is that Google Sheets uses =IF(ISBLANK(A1), ...) the same way, and array formulas use ARRAYFORMULA instead of implicit intersection.

Q: How do I highlight cells that have a value using conditional formatting?
Select the range, go to Home > Conditional Formatting > New Rule > “Use a formula to determine which cells to format.” Enter =ISBLANK(A1)=FALSE (adjust A1 to the top-left cell of your selection) and set a format. This highlights any cell that is not blank.

Summary

Checking “has value” in Excel is a matter of choosing the right function for the type of value you care about. For any content, use ISBLANK or COUNTA. For numbers, use ISNUMBER or COUNT. For specific values, use COUNTIF or a direct comparison. Always be aware of invisible characters and empty strings, and test your formulas with sample data to ensure they behave as expected.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.