**Please Note: **
This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. If you are using an earlier version (Excel 2003 or earlier), *this tip may not work for you*. For a version of this tip written specifically for earlier versions of Excel, click here: Checking for an Entry in a Cell.

There are times when it is helpful to know if a cell contains something—it doesn't really matter what it contains, just that it contains something. In these instances, there are two ways you can approach the problem.

The first solution is to simply use the LEN function to determine if there is a length to what is contained in a cell. For instance, let's say you wanted to check if there was a value in cell F1. You could use the following:

=IF(LEN(F1)>0,"Found something there","Nothing is there")

If there is nothing in cell F1, then the length will be equal to zero. If there is something in the cell, then the length will be greater than zero.

The second solution is a variation on the LEN approach. All you need to do is check to see if there is anything in the cell. This may sound odd, but it is easier when you see the formula. For example, the following will check to see if there is anything in cell B4:

=IF(B4<>"","Found something there","Nothing is there")

The test in this formula is True if there is anything in the cell. If the cell is empty, then the test fails.

Another solution you can use is the ISBLANK worksheet function. This function returns True if the target cell is blank, and False if it contains anything.

As an example, let's suppose you want to check if the user has entered something in cell D7. You can use the following to make the determination:

=IF(ISBLANK(D7),"Input values missing",D7)

In this case the cell containing this formula would contain the same value as in D7, provided something was there. If there is nothing in D7, then the cell contains the text "Input values missing."

*ExcelTips* is your source for cost-effective Microsoft Excel training.
This tip (11439) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. You can find a version of this tip for the older menu interface of Excel here: **Checking for an Entry in a Cell**.

**Save Time and Supercharge Excel!** Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out *Excel 2010 VBA and Macros* today!

Need to figure out if a cell contains a number so that your formula makes sense? (Perhaps it would return an error if the ...

Discover MoreDo you need to concatenate the contents of a range of cells in the same column? Here's a formula and a handy macro to ...

Discover MoreWhen editing information in a cell, you may need to know the result of a portion of your formula. The shortcut described ...

Discover More**FREE SERVICE:** Get tips like this every week in *ExcelTips,* a free productivity newsletter. Enter your address and click "Subscribe."

2020-08-19 21:52:03

Peter

2020-08-19 09:44:07

Peter Atherton

Further to Mike's comment

ISBLANK returns false if aef contains a formula

e.g. if(a1=0,"","Value")

2020-08-18 12:34:41

JMJ

@Mike

Very useful remark! Thanks!

2020-07-11 12:50:24

Mike

If the target cell contains just a single quote, the ISBLANK() method will detect it, but the LEN() method and the <>"" method will find nothing. Might be relevant if searching for the last used cell, as Find/Replace doesn't find it either.

2020-07-11 11:56:34

Steve D

Got a version of Excel that uses the
ribbon interface (Excel 2007 or later)?
**This site is for you!** If you
use an earlier version of Excel, visit
our *ExcelTips* site focusing on the menu interface.

**FREE SERVICE:** Get tips like this every week in *ExcelTips,* a free productivity newsletter. Enter your address and click "Subscribe."

Copyright © 2020 Sharon Parq Associates, Inc.

## Comments