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 a Value in a Cell.

# Checking for a Value in a Cell

Written by Allen Wyatt (last updated April 15, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003

If you need to base a calculation on whether a cell has a number in it or not, you can use the ISNUMBER worksheet function. This function returns True if the target cell contains a numeric value or False if it contains anything else. For instance, if you want to do a calculation based on whether cell A3 contains a number, you could use the following:

```=IF(ISNUMBER(A3),(A3*12)/52,"Enter number in cell A3")
```

This example results in the cell containing the result of (A3 * 12) / 52, but only if A3 contains a number. If it does not (for instance, it is blank or contains text), then the result contains the text "Enter number in cell A3."

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2113) 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 a Value in a Cell.

##### Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

##### MORE FROM ALLEN

Auto Creation of an Acronym List

If you use a lot of acronyms in your documents, you may want a quick way to compile those acronyms and their definitions ...

Discover More

Moving Objects with a Chart

Excel allows you to add all sorts of objects to your worksheets. Among the objects you can add are text boxes, shapes, ...

Discover More

Hiding Columns Based on a Cell Value

Need to hide a given column based on the value in a particular cell? The easiest way to accomplish the task is to use a ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

When you are entering information in a worksheet, it sure would be handy to have a way to "mask" the information being ...

Discover More

Combining Columns

Need to concatenate the contents in a number of columns so that it appears in a single column? Excel has no intrinsic way ...

Discover More

Finding Unused Names

After months or years of naming things (such as cell ranges), you may find your workbook cluttered with a bunch of names ...

Discover More
##### Subscribe

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

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. Youâ€™ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 4 + 6?

2019-09-17 20:20:01

Jay Bingham

This is good advice as far as it goes, however, suppose that you have a formula that can produce either a number or a blank cell and you have a formula in a second cell that references the first cell but it will produce an error if the formula in the first cell does not produce a number. Neither the ISNUMBER nor the ISBLANK function are of any use in this case, because contents of the first cell is neither a number or a blank.
I have found that the MAX and the MIN functions can be used to determine if the referenced cell actually contains a number.
For example if cell C4 contains this formula =IF(SUM(D24:D34),SUM(D24:D34),"") and in another cell, lets say C22, you want to determine if cell C4 resolves to a number rather than a blank so that the formula in C22 will not produce an error if C4 resolves to a blank then the formula in C22 can use the MAX function to make that determination, e.g. =IF(AND(MAX(C4)>0,C13>0),C4/C13,"").
There may be other ways to determine this but I stopped looking when I found that MAX and MIN would do the trick.

##### This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.