By using vba.booksticle.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes

948 Steps to 6 Figures by Learning Excel-VBA and Other Skills



Step 173 - <> - not equal, condition


The not Equal condition should be familiar to you if you do any =If functions in Excel.

It is used to determine whether two items are not equal

Try the following
Immediate Window


? 5 <> 6
? 5 <> 5
? "abcd" <> 5
? 5 != 6
? not 5 = 6
a = 8
b = 8
c = "abc"
? a <> b
? "abc " <> c
? "ABC" <> c



This conditional can be used in:
  • If
  • IIF
  • Do While
  • Repeat until
  • Excel If
  • SumIf

    See also
  • True and False

  •    Table of Contents | Send us your feedback | © 2025 All Rights Reserved | Edit