Excel.Tips.Net ExcelTips (Menu Interface)

Checking for an Entry in a Cell

Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later 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 so 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, even a number, 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 (2112) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Checking for an Entry in a Cell.

Related Tips:

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!


Leave your own comment:

  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*What is 4+5 (To prevent automated submissions and spam.)
          Commenting Terms

Comments for this tip:

S Ngerengere    23 Sep 2015, 14:31
I need to auto print a separate filtered worksheet of each debtor per month .... I need excel to skip to next one if there is no charge for a debtor that month. So say c3 has no info then skip to next debtor and loop till last debtor has been printed.
pradeep    30 Jun 2015, 10:11
i want to require that if cell A1 is filled, cell B1 is also filled, and give an error message to user saying that you cannot leave Cell B1 blank. is there a formula for this or any macros ?
TechAlex    23 May 2015, 11:38
Thank you very much for these tips. My excel spread sheet formula is using two cells in two different columns, I found the solution right here.

 =IF(ISBLANK(C17)," ",C17-C16)
Juan    23 Dec 2014, 10:24
Thanks the tips works like a dream
Bryce    05 Jun 2014, 14:14
Sure, except that the LEN and ISBLANK and all the other logical test throw a "Formula refers to empty cell" error if the cell they refer to is actually blank. What good are blank-checking "functions" that can't handle blank cells?
Reanj    26 Jul 2013, 13:18
This is great, I'm doing my inventory and keep on receiving error because of missing values..28,000 for inventory is a lot and these options you have to check the data entries really help!
Bruce    12 Mar 2012, 20:51
To Jones Lee: Of course "ISBLANK" fails for B1, that cell contains a formula, so it is not blank. You need to be checking A1 in your example (the 'input' cell).
Jones Lee    11 Mar 2012, 23:23
Thanks for this. However I encounter a problem of "ISBLANK". Say I put this formula in cell B1 =if(len(a1)=0,"","a1") and leave cell A1 blank. Of course cell B1 shows blank, but formula ISBLANK(B1) still feeds back FALSE.
Susan    10 Mar 2012, 14:18
Thank you for this one! I created a rough file for doing my tax returns. (I find confusing the bells and whistles and unnecessary lines of the commercial tax programs.) However, sometimes I might forget to fill in a cell, and wrongly think that empty cell's content is included into a calculation. From now on I'll incorporate this additional check to make sure there are no stupid mistakes.

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2015 Sharon Parq Associates, Inc.