Google Sheets IF Empty: Formulas and Blank-Cell Checks

How-to basics · Updated November 3, 2026

Google Sheets IF Empty: Formulas and Blank-Cell Checks

If the cell you want to check is A2, use =IF(A2="","Empty","Not empty") to show one result when it is empty and another when it contains something. In Google Sheets, the comparison A2=”” also treats a formula result of an empty string as empty, while ISBLANK checks whether the cell itself has no value or formula.

What “empty” means in Google Sheets

People use “empty” to describe several different states in a spreadsheet. A cell may be genuinely unused, contain a formula that displays nothing, contain spaces, or contain a value that looks blank because of formatting. These states can behave differently in formulas, so it helps to decide which one you mean before building a check.

  • Truly blank: Nothing has been entered in the cell. There is no value or formula.
  • Formula-generated blank: The cell contains a formula, but the formula returns an empty text string. The cell looks empty but is not truly blank.
  • Whitespace: The cell contains one or more spaces, tabs, or other invisible characters. It may look blank but has content.
  • Hidden value: The cell contains a value, but formatting makes it hard to see—for example, white text on a white background.

Most everyday “if empty” checks are intended to catch the first two states. A comparison with an empty string is often a practical choice for that purpose. If you need to distinguish a genuinely unused cell from a formula that displays nothing, use ISBLANK instead.

Build a basic IF check

IF evaluates a condition and returns one result when the condition is true and another when it is false. The pattern is IF(condition, value_if_true, value_if_false). For a simple empty-cell test, compare the target cell with two quotation marks: that represents an empty text string.

Assume A2 contains a task status, and you want a label in B2. With the task status in A2, this formula displays “Needs a status” if A2 is empty and “Entered” otherwise:

=IF(A2="","Needs a status","Entered")

When A2 is blank, the result in B2 is Needs a status. If A2 contains “In progress,” the result is Entered. You can fill the formula down a column to check each row; relative references will change from A2 to A3, A4, and so on.

The two outcomes do not have to be labels. They can be numbers, text, or other calculations. For example, you might show a reminder until an order ID is entered, or calculate a value only after all required inputs are present. Use quotation marks around text outcomes, and leave numbers unquoted.

Return a blank until information is ready

A common reason to use IF with an empty-cell test is to prevent a report from showing zeros, errors, or unfinished calculations. A formula can return an empty string, written as two quotation marks with nothing between them. The cell then appears blank, although it still contains a formula.

Assume A2 and B2 are two required fields, such as a first name and last name, and C2 should show a combined name only when both are filled in. This formula returns a blank until both inputs have content:

=IF(OR(A2="",B2=""),"",A2&" "&B2)

With A2 containing “Maya” and B2 empty, C2 appears blank. Once B2 contains “Chen,” the result is Maya Chen. The ampersand joins text, while OR makes the condition true if either required cell is empty. In a real sheet, choose whether spaces or other invisible characters should count as content before relying on this test.

Returning an empty string can make charts, summaries, and printed sheets easier to read, but it does not remove the formula. For example, a later formula using ISBLANK on C2 will find that C2 is not truly blank. If another calculation must treat the displayed blank as empty, use a test that checks for an empty string rather than relying only on ISBLANK.

Choose between ISBLANK, an empty-string test, and COUNTBLANK

These checks answer related but different questions. Pick the one that matches your data rather than assuming all blank-looking cells are identical.

  • Use A2=”” when you want to treat an unused cell and a formula result of an empty string as empty. This is often the most convenient test for “nothing visible here.”
  • Use ISBLANK(A2) when you need to know whether the cell is genuinely empty. It returns FALSE if A2 contains a formula, even when that formula displays nothing.
  • Use COUNTBLANK(range) when you want to count empty cells across a range. In Google Sheets, cells containing formulas that return empty strings are counted as blank by COUNTBLANK.

Assume A2 is genuinely empty and A3 contains a formula that returns an empty string. This formula in B2 checks whether A2 itself is blank and returns TRUE:

=ISBLANK(A2)

With A3 as the reference instead, the result is FALSE because A3 contains a formula. That distinction matters in a table where formulas have been copied down in advance: the rows may look unused, but they are not empty to ISBLANK.

Assume the cells to audit are A2 through A10. This formula returns the number of blank cells in that range, including cells whose formulas return empty strings:

=COUNTBLANK(A2:A10)

If three cells in that range are blank by COUNTBLANK’s rules, the result is 3. If you need a count only of cells that have never had a value or formula, COUNTBLANK is not the right test by itself; use individual ISBLANK checks or adjust the data design so the distinction is explicit.

Handle cells that contain only spaces

A comparison such as A2=”” does not treat a space character as empty. This is useful when spaces are legitimate data, but it surprises people who have copied or pasted values from another source. A cell containing a single space can look blank while an empty-string test treats it as nonempty.

Assume A2 may contain ordinary leading or trailing spaces and you want to label a cell containing only spaces as empty. This formula trims surrounding spaces before checking:

=IF(TRIM(A2)="","Empty or spaces","Has content")

If A2 contains three ordinary spaces, the result is Empty or spaces. If it contains “ North ”, TRIM removes the extra spaces around the word and the result is Has content. TRIM also reduces repeated ordinary spaces within text. It is not a universal cleanup tool for every invisible character: tabs and nonbreaking spaces may need separate handling, depending on how the data was imported.

For imported lists, it can be safer to clean a copy of the data first, then inspect the results. That way, you can confirm that cleaning has not altered meaningful text. Avoid changing source data automatically when the original values need to be preserved for auditing or comparison.

Use empty checks in practical sheet workflows

An empty check can support more than a label. It can flag incomplete records, hold back calculations until inputs arrive, or make a dashboard easier to scan. A useful approach is to decide what each row needs, then make the formula test those exact fields.

  • Flag missing information: Check an ID, date, or required name field and return a clear prompt when it is absent.
  • Show a calculation only when ready: Test the required input cells first so the sheet does not display a partial result.
  • Count gaps in an entry form: Use COUNTBLANK on the specific input range, rather than a much larger area that includes headings and formulas.
  • Review a data import: Check for cells that look blank but contain spaces or other characters before drawing conclusions from a blank count.

For example, a sign-up sheet might have columns for email address, consent, and submission date. One row may be incomplete because the email field is missing, while another may be missing consent. A single “complete” flag should test all required fields; testing only the email address could incorrectly mark a row complete. Also decide how to treat valid values such as a numeric zero or a checkbox set to FALSE—neither should automatically be treated as empty just because it may look different from text.

Highlight empty cells with conditional formatting

If you want to see missing entries rather than return text in a helper column, use conditional formatting. In Google Sheets in a browser, select the range, choose Format > Conditional formatting, then create a rule. For a custom formula rule, the reference should match the first cell in the selected range.

Assume you select A2:A100 and want to highlight cells that are empty or display an empty string. Use this custom formula for the rule:

=A2=""

Choose a formatting style and select Done. Because A2 is the first cell in the selected range, Sheets adjusts the reference for each row. If you select a range beginning at B2 instead, write the formula using B2. Conditional formatting changes appearance; it does not fill in missing values or remove formulas.

If the cells may contain spaces, a basic empty-string condition will not flag them. You can use a trimming test as a custom formula, but consider whether the data really should be treated as blank before applying the rule. A red highlight for every space-only cell can be helpful in a cleanup pass, while the same rule may be misleading if spaces have a legitimate purpose in the dataset.

Common mistakes and troubleshooting

When an empty check gives an unexpected result, inspect the cell itself and the formula around it. The most frequent cause is that a cell only appears empty.

  • A blank-looking cell is treated as filled: It may contain a space, an invisible character, or a formula returning text. Test with TRIM for ordinary spaces, or inspect the formula bar and source data.
  • ISBLANK returns FALSE: The cell may contain a formula, even if that formula displays nothing. Use an empty-string comparison when the displayed result is what matters.
  • A formula shows 0 instead of blank: Check whether the formula’s empty case returns zero, or whether the calculation is running on zero-valued inputs. Add an explicit IF condition for the fields that must be present.
  • A formula shows an error: An empty-cell test only prevents an error if it checks the inputs that cause that error. A formula that divides by a value of zero, for example, needs a separate zero check; “not empty” does not mean “safe to calculate.”
  • The conditional format highlights the wrong cells: Confirm the selected range and make the formula reference its top-left cell. Relative references shift across the range.

For troubleshooting, test one cell at a time in a spare column and compare the result with what you see. This makes it easier to separate a truly blank cell from a formula-generated blank or whitespace, especially in imported data.

How Google Sheets differs from Excel

The core functions discussed here—IF, ISBLANK, COUNTBLANK, TRIM, and OR—are also available in Excel, and the basic logic is similar. A formula written for a simple empty-cell check will usually look familiar in both programs. However, menu names, dialogs, and some details of formatting setup differ, so follow Google Sheets instructions when working in Sheets rather than expecting Excel’s ribbon paths to match.

In Google Sheets, the menu path for conditional formatting is Format > Conditional formatting. The web interface also makes it straightforward to share a sheet and collaborate, but sharing does not change what an empty cell means to a formula. If a workbook is moved between Sheets and Excel, verify formulas, formatting rules, and any imported data rather than assuming every visual or behavioral detail will be identical.

Frequently Asked Questions

How do I check if a cell is empty in Google Sheets?

Use an IF test such as A2=”” when you want to treat both a truly blank cell and a formula result of an empty string as empty. Use ISBLANK(A2) when you specifically need to know whether the cell contains no value or formula.

Does ISBLANK detect a formula that displays nothing?

No. A cell containing a formula is not truly blank, even if the formula returns an empty string and the cell looks empty. Use an empty-string comparison when you want to test the displayed result instead.

How can I count empty cells in Google Sheets?

Use COUNTBLANK with the range you want to check. It counts cells that are blank, including cells whose formulas return an empty string. Keep the range limited to the relevant input cells so headings and unrelated columns do not affect the count.

Why does Google Sheets say a blank cell is not empty?

The cell may contain a space, an invisible character, or a formula. Check the formula bar and, for ordinary spaces, try a TRIM-based test. A blank appearance alone does not prove that a cell has no content.

How do I leave a formula result blank when an input is missing?

Wrap the calculation in IF and make the true result an empty string. Test every required input before running the calculation, and remember that the formula cell will still contain a formula even though it appears blank.

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.