Google Sheets NOT Function: Syntax, Examples & Tips

The NOT function returns the opposite of a logical value, converting TRUE to FALSE and vice versa, useful for negating conditions.
Google Sheets
NOT(logical_expression)

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

On this page
  1. Parameters
  2. What is an XLOOKUP?
  3. A Practical Example
  4. XLOOKUP Formula
  5. Result of the Formula
  6. Why Use XLOOKUP?
  7. Key Takeaways:
  8. Example use case

Parameters

logical_expression:
The expression that you want to evaluate. This can be a cell reference, a comparison between values, or any expression that results in a TRUE or FALSE value.

What is an XLOOKUP?

The XLOOKUP function in Google Sheets is a powerful tool used to search for a value in a range or array and return a corresponding value from another range or array. It is a more versatile and user-friendly alternative to older lookup functions like VLOOKUP and HLOOKUP. Unlike these older functions, XLOOKUP can search both vertically and horizontally, and it can return multiple results.

In simpler terms, XLOOKUP allows you to find specific data in a table and retrieve related information from that table in a straightforward manner.

A Practical Example

Imagine you are managing a product inventory and sales records stored in an Excel spreadsheet:

Products Table:

ProductIDProductNamePrice
101Widget A25.00
102Widget B30.00
103Widget C15.00

Sales Table:

SaleIDProductIDQuantity
11013
21035

You want to find the price of each product sold in the sales table. If a product has not been sold, you still want to display its price.

XLOOKUP Formula

To achieve this, you would use the XLOOKUP function as follows:

Google Sheets
=XLOOKUP(B2, Products!A:A, Products!C:C, "Not Sold")

In this formula:

  • B2 is the cell containing the ProductID from the Sales Table.
  • Products!A:A is the range where the function will look for the ProductID in the Products Table.
  • Products!C:C is the range from which the function will return the corresponding Price.
  • "Not Sold" is the value that will be returned if there is no match found.

Result of the Formula

When you apply the XLOOKUP formula to the Sales Table, the output would look like this:

SaleIDProductIDQuantityPrice
1101325.00
2103515.00

If you were to add a row for a product that hasn't been sold, such as Widget B, the result would still show its price as follows:

SaleIDProductIDQuantityPrice
1101325.00
2103515.00
3102030.00

In this case, if you input ProductID 102 in the Sales Table, the XLOOKUP would return "30.00" for Widget B.

Why Use XLOOKUP?

XLOOKUP is beneficial because it simplifies the process of looking up data in Excel. It eliminates the need for complex nested functions and provides a more intuitive way to retrieve data. Additionally, it allows for error handling by returning a custom message when no match is found, making your spreadsheets more user-friendly.

Key Takeaways:

  • XLOOKUP: A modern Excel function that searches for a value and returns a corresponding value from another range.
  • Versatile: Can search both vertically and horizontally, making it suitable for various data layouts.
  • Error Handling: Offers the ability to return custom messages for unmatched lookups, enhancing usability.
  • Common Use Cases: Ideal for inventory management, sales tracking, and any scenario where data retrieval from related tables is necessary.

XLOOKUP is an essential function for anyone working with data in Excel, providing a powerful way to enhance data analysis and reporting capabilities.

Happy spreadsheeting!

Example use case

You have a table with product IDs in Column A and their prices in Column B. Use XLOOKUP to input a product ID and instantly find its price. This streamlines inventory management and enhances pricing accuracy without the drawbacks of older functions.

Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.