3.1 C
London
Friday, December 20, 2024
HomeSoftware TutorialsGoogle SheetsGoogle Sheets: A Simple Formula for “If Not Empty”

Google Sheets: A Simple Formula for “If Not Empty”

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

You can use the following formula in Google Sheets to perform some task if a cell is not empty:

=IF(A1"", Value_If_Not_Empty, Value_If_Empty)

This particular formula checks if cell A1 is empty. If it is not empty, then Value_If_Not_Empty is returned. Otherwise, Value_If_Empty is returned.

The following example shows how to use this formula in practice.

Example: Use “If Not Empty” Formula

Suppose we have the following dataset in Google Sheets that contains information about various basketball teams:

We can use the following formula to return a value of “Team Exists” if the cell in column A is not empty. Otherwise, we’ll return a value of “Does Not Exist”:

=IF(A2"", "Team Exists", "Does Not Exist")

The following screenshot shows how to use this formula in practice:

Google Sheets if not empty formula

If the team name is not empty in column A, then “Team Exists” is returned.

Otherwise, “Does Not Exist” is returned.

Note that we could also return numeric values instead of character values.

For example, we could use the following formula to return the value of the points column multiplied by two if the cell in column A is not empty. Otherwise, we’ll return an empty value:

=IF(A2"", B2*2, "")

The following screenshot shows how to use this formula in practice:

If the team name is not empty in column A, then we return the value in the points column multiplied by two.

Otherwise, we return an empty value.

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets:

How to Filter for Cells that Contain Text in Google Sheets
How to Extract Substring in Google Sheets
How to Extract Numbers from String in Google Sheets

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories