Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Google Sheets Not Equal: Formula Guide

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The “not equal” operator in Google Sheets is <>. You use it inside a formula to test whether two values are different, and it returns TRUE or FALSE. For example, =A1<>"Done" returns TRUE when A1 contains anything other than “Done”. You can also use it inside functions like COUNTIF, SUMIF, FILTER, and IF to act on those results. Nothing needs to be installed; just open your sheet and type the formula into a cell.

What You'll Need

  • A Google account with access to Google Sheets (the free web or mobile app is fine).
  • A spreadsheet with at least two cells of data to compare, or a column you want to filter or count.
  • Basic familiarity with typing formulas that start with =.

Step-by-Step

  1. Open your spreadsheet in Google Sheets on desktop or mobile. The steps below work the same in both, though the formula bar is easier to use on a computer.
  2. Click an empty cell where you want the result to appear. This is your output cell.
  3. Type the equals sign = to start a formula.
  4. Enter the first value or cell reference, then the not-equal operator <>, then the second value. For example: =A2<>B2. This compares the two cells and returns TRUE if they are different, FALSE if they are the same.
  5. Press Enter (or the checkmark on mobile) to commit the formula. The cell now shows TRUE or FALSE.
  6. To compare against text, put the text in double quotes: =A2<>"Complete". This returns TRUE for any value in A2 that is not exactly “Complete”. Text comparison is case-insensitive by default, so “complete” and “Complete” are treated as equal.
  7. To use not-equal inside an IF statement, wrap it like this: =IF(A2<>"", "Has value", "Blank"). This checks whether A2 is not empty and returns a label. The empty string "" represents a blank cell.
  8. To count cells that are not equal to a value, use COUNTIF with the not-equal operator: =COUNTIF(B2:B10, "<>Done"). This counts every cell in B2:B10 whose content is not exactly “Done”. Note that the operator goes inside the quotes when used as a criterion.
  9. To sum values where a corresponding cell is not equal to something, use SUMIF: =SUMIF(A2:A10, "<>Closed", C2:C10). This adds the numbers in C2:C10 only for rows where A2:A10 is not “Closed”.
  10. To filter a range so only rows where a column is not equal to a value are shown, use FILTER: =FILTER(A2:C10, A2:A10<>"Archived"). This returns all rows where column A is not “Archived”.
  11. Copy the formula down by dragging the fill handle (the small square at the bottom-right of the cell) or by copying and pasting. Relative references adjust automatically.

Common Mistakes

  • Using != instead of <>. Google Sheets does not accept != as a not-equal operator in formulas; it will produce an error. Always use <>.
  • Forgetting quotes around text. Writing =A1<>Done without quotes makes Sheets look for a named range called “Done” and returns a #NAME? error. Use "Done".
  • Mixing up the operator placement in COUNTIF/SUMIF. The not-equal sign must be inside the quotes: "<>Done", not <>"Done". The latter is a syntax error in those functions.
  • Expecting case-sensitive comparison. By default, <> ignores case. If you need case-sensitive not-equal, you must use a function like EXACT inside an IF, e.g. =IF(EXACT(A1,"Done"), "Equal", "Not equal") and invert the logic.
  • Comparing numbers stored as text. A number formatted as text may not equal the same number typed as a number. Use VALUE or clean the data if results look wrong.
  • Assuming blank cells are not equal to empty string. A truly empty cell compared to "" returns FALSE (they are considered equal). A cell containing a space is not equal to "" and returns TRUE.

Tips

  • Use not-equal with conditional formatting to highlight cells that differ from a target. For example, select a range, open Format > Conditional formatting, choose “Custom formula is”, and enter =A1<>"Done" (adjust the reference to the top-left cell of your range).
  • Combine not-equal with AND or OR for multiple conditions: =AND(A1<>"", B1<>"") checks that neither cell is blank.
  • When counting non-blank cells, COUNTIF(range, "<>") counts cells that are not empty. This is a quick way to count filled cells without specifying a value.
  • Remember that the not-equal operator returns a boolean; you can use it directly in FILTER, IF, and other functions that accept logical tests.
  • If you need to compare dates, ensure both values are true dates (not text). Use =A1<>DATE(2025,1,1) for a specific date.

Troubleshooting

  • Formula returns #NAME? or #ERROR! Check that you used <> and that any text is in double quotes. Also ensure you did not accidentally type a space inside the operator.
  • Result is always FALSE when you expect TRUE. Verify the cell contents—extra spaces, non-printing characters, or numbers stored as text can cause unexpected equality. Use TRIM or CLEAN to remove spaces, or check with LEN.
  • COUNTIF with not-equal counts blanks unexpectedly. In COUNTIF, the criterion "<>Done" counts blank cells as not equal to “Done”. If you want to exclude blanks, use =COUNTIFS(B2:B10, "<>Done", B2:B10, "<>").
  • FILTER returns #N/A. This means no rows met the condition. Check that your range and criteria are correct, and that the not-equal value is spelled exactly as in the data.
  • Formula works in one cell but not when copied. Look for absolute vs relative references. If you need a fixed comparison value, use $ like $D$1.
  • Mobile app behaves differently. The formula syntax is the same, but the formula bar may be hidden; tap the cell and look for the function icon (fx) to edit. If you cannot find it, rotate to landscape or use the desktop version for complex formulas.

Frequently Asked Questions

What is the not-equal operator in Google Sheets?

It is <>. For example, =A1<>B1 returns TRUE if the two cells are different.

Can I use != in Google Sheets?

No, Google Sheets does not recognize != as a not-equal operator in formulas. Use <> instead.

How do I count cells that are not equal to a specific value?

Use =COUNTIF(range, "<>value"). For example, =COUNTIF(A1:A10, "<>Done") counts cells not equal to “Done”.

Is not-equal case-sensitive?

No, by default the comparison is case-insensitive. “Done” and “done” are considered equal. For case-sensitive comparison, use the EXACT function.

How do I check if a cell is not blank?

Use =A1<>"". This returns TRUE if A1 contains any value, including a space, and FALSE if it is completely empty.

Can I use not-equal in conditional formatting?

Yes. In the conditional formatting rule, choose “Custom formula is” and enter a formula like =A1<>"Done" for the range you selected.