Excel NOT Function

The Excel NOT function returns the opposite result of a logical value

Example: Excel NOT Function

Excel NOT Function

METHOD 1. Excel NOT Function using

EXCEL

=NOT(ISNUMBER(B5))
Result in cell C5 (FALSE) - returns the opposite value to the result associated with the ISNUMBER function. Given the ISNUMBER function tests if cell B5 is a numeric value, which it is, the ISNUMBER function will return a TRUE value. Therefore, the NOT function will return an opposite value, which in this example will be FALSE.

=NOT(ISNUMBER(B6))
Result in cell C6 (TRUE) - returns the opposite value to the result associated with the ISNUMBER function. Given the ISNUMBER function tests if cell B6 is a numeric value, which it isn't, the ISNUMBER function will return a FALSE value. Therefore, the NOT function will return an opposite value, which in this example will be TRUE.

METHOD 2. Excel NOT function using the Excel built-in function library

EXCEL

Formulas tab > Function Library group > Logical > NOT > populate the input boxes

=NOT(ISNUMBER(B5))
Note: in this example we are applying the ISNUMBER logic test against cell B5, which is a numeric value. The ISNUMBER function will return a TRUE value, therefore, the NOT function will return the opposite logic value, which will be FALSE.
Built-in Excel NOT Function

METHOD 1. Excel NOT function using VBA

VBA

Sub Excel_NOT_Function()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("NOT")
'apply the Excel NOT function

ws.Range("C5").Formula = "=NOT(ISNUMBER(B5))"
ws.Range("C6").Formula = "=NOT(ISNUMBER(B6))"

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Range: The Range object is a representation of a single cell or a range of cells in a worksheet.
PREREQUISITES
Worksheet Name: Have a worksheet named NOT.
Logic: In this example we are testing if the values in cells ("B5") and ("B6") are numeric, through the use of the ISNUMBER function, and then return the opposite result to the ISNUMBER function. Therefore, if using the exact same VBA code, cells ("B5") and ("B6") need to capture the values that you are testing.

ADJUSTABLE PARAMETERS
Output Ranges: Select the output ranges by changing the cell references ("C5") and ("C6") in the VBA code to any cell in the worksheet, that doesn't conflict with the formula.
Logic: Select the logic that you want to test by replacing the ISNUMBER function.

Usage of the Excel NOT function and formula syntax

EXPLANATION

DESCRIPTION
The Excel NOT function returns the opposite result of a logical value. For example, if a logic that is being tested returns a TRUE value, using the NOT function will return FALSE.
SYNTAX
=NOT(logical)

ARGUMENTS
logical: (Required) A TRUE or FALSE value, whether it's directly entred or derived through a logical test.