The NOT function reverses the logical value of its argument. If given TRUE, it returns FALSE; if given FALSE, it returns TRUE. NOT is essential for inverting conditions and is commonly used with IF, AND, and OR to create inverted or negative conditional logic.
=NOT(logical)A value or expression that evaluates to a logical value (TRUE or FALSE). NOT will reverse this value.
FALSE if argument is TRUE; TRUE if argument is FALSE
Description: Reverses the logical value of its argument
Reverse a logical value
NOT reverses TRUE to FALSE. If A1 contains FALSE, NOT(A1) would return TRUE.
Master the fundamentals of Excel NOT function
The NOT function is Excel's implementation of the logical NOT operation (negation). It performs Boolean negation, returning the inverse of its argument. NOT is fundamental for creating inverted conditions, exclusion logic, and negative validation rules.
Returns the opposite of its argument
NOT takes exactly one logical argument
Inverts comparison results
Perfect for checking what something is NOT
Function-specific parameters
Function-specific return type
Reverse comparison results
Check that values are NOT in a list
Validate against prohibited values
Invert AND/OR expressions
Exact matching required
Returns numeric position
Handles missing text gracefully
=NOT(logical)A value or expression that evaluates to TRUE or FALSE
FALSE if argument is TRUE; TRUE if argument is FALSE
Description: Reverses the logical value of its argument
Reverse a logical value
NOT returns the opposite value
Using NOT operator in VBA
Sub NOTExample()
Dim value As Boolean
value = True
' Method 1: Using VBA NOT operator
Dim result As Boolean
result = Not value
Range("B1").Value = result ' Returns False
' Method 2: Using WorksheetFunction.Not
result = Application.WorksheetFunction.Not(value)
Range("C1").Value = result
' Method 3: Invert condition
If Not Range("A1").Value > 80 Then
Range("D1").Value = "Value is not greater than 80"
End If
' Method 4: NOT with AND
Dim condition1 As Boolean
Dim condition2 As Boolean
condition1 = Range("A1").Value > 50
condition2 = Range("B1").Value > 50
If Not (condition1 And condition2) Then
Range("E1").Value = "Not both conditions are met"
End If
' Method 5: Exclusion logic
Dim status As String
status = Range("A1").Value
If Not (status = "Active") Then
Range("F1").Value = "Status is not Active"
End If
End SubReverse comparison results
Check values are NOT in a list
Validate against prohibited values
Invert AND/OR expressions
NOT not working as expected
=NOT(A1)Solution: Verify the argument evaluates to a logical value. NOT only works with TRUE/FALSE values. Use comparison operators to create logical values: NOT(A1>80).
NOT not working with text
=NOT(A1="Active")Solution: Ensure the comparison creates a logical value first: NOT(A1="Active") works, but NOT(A1) doesn't work if A1 contains text. NOT needs a logical value, not text.
Using NOT(NOT(...)) unnecessarily
=NOT(NOT(A1>80))Solution: NOT(NOT(value)) returns the original value. Use the original value directly instead: NOT(NOT(A1>80)) is equivalent to A1>80.
Using NOT when simpler operator exists
=NOT(A1>80) vs =A1<=80Solution: Consider using alternative operators: NOT(A1>80) can be written as A1<=80. Use NOT when it makes the logic clearer or when inverting complex expressions.