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

by Allen Wyatt
(last updated November 30, 2015)

1

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

Getting a Warning for Markup

Many people, when collaborating on a document with others, use the Track Changes feature to show the effects of their ...

Discover More

Merging Table Cells

Want to create cells that span multiple columns or multiple rows? You do this in Word by merging cells together. Here's how ...

Discover More

Inserting Today's Date

When writing letters, reports, or other date-dependent documents, you need to regularly insert the current date in the ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

MORE EXCELTIPS (MENU)

Creating New Windows

If you need to look at different parts of the same worksheet at the same time, the answer is to create windows for your data. ...

Discover More

Finding Unknown Links

There are several things to try when finding unknown links in Excel.

Discover More

Cell Movement After Enter

What happens when you press Enter in a cell depends on how you have Excel configured. Here's the way you can control the ...

Discover More
Subscribe

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

View most recent newsletter.

Comments for this tip:

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}] in your comment text. You’ll be prompted to upload your image when you submit the comment. 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 3 - 0?

2012-06-30 07:48:46

Siddhartha

Hello Alen,

Further to my previous comment about the IF function working just as well as the ISNUMBER function.

I asked you if you could suggest any way in which I could stop the line chart from not nosediving to zero for a date in the future, I have indeed got an answer.
It certainly works:

Jon Peltier wrote on 22nd Jan 2011:

http://www.techrepublic.com/forum/questions/101-340530/excel-formula-to-not-graph-0s

The response was as follows:

Excel formula that won't graph zeros.
Change the 0 in the formula that is returned if there is no value to NA(). This puts #N/A into the cell. Line and XY charts in Excel do not plot a point if its X or Y value is #N/A.

If you change the 0 to "" to make it look like a blank, Excel considers this a piece of text, and still plots it as a zero.

I replaced the entire string argument "" with #N/A and it works brilliantly.
OK it shows #N/A for future values it does not know yet from source data, but once the source data is populated and the blue handlebar for the range is dragged well into the future, it just incorporates the populated value as a point on the line chart.

Thank you Jon Peltier of Techrepublic.com forum.

Regards to you both.
Siddhartha


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.

Newest Tips
Subscribe

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

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.

Links and Sharing