Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. 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: Determining a Value of a Cell.

Determining a Value of a Cell

by Allen Wyatt
(last updated November 28, 2016)


You already know that a cell in a worksheet can contain any number of different items: numbers, dates, formulas, and so on. There may be times when you want to determine the underlying value in a cell, without regard to the way the cell is formatted. For this need, Excel provides the N worksheet function. For instance, let's assume that cell F17 contains a date. If you use = N(F17) as your formula, the value returned by the formula is the underlying serial number used for the date.

Besides returning date serial numbers, the N worksheet function returns a number if the referenced value or cell can be resolved to a number, a 1 if the value or cell can be resolved to the logical value True, and a 0 for anything else. The following provides a few examples of how the N worksheet function works:

Value in F17 Returned by = N(F17)
3/11/99 36230
37.14 37.14
Quarter 1 0
5:40 0.236111

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11552) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Determining a Value of 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. ...


Spellchecking Words with Superscripts

Adding a superscript to a word is necessary for many types of writing. Doing so, however, can confuse the spell checker ...

Discover More

Exiting a For ... Next Loop Early

If you use For ... Next loops in your macros, make sure you give a way to jump out of the loop early. That way you can ...

Discover More

Adjusting Row Height for a Number of Worksheets

Adjusting the height of a row or range of rows is relatively easy in Excel. How do you adjust the height of those same ...

Discover More

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!

More ExcelTips (ribbon)

Leaving a Cell Value Unchanged If a Condition Is False

Ever want the IF function to only return a value if the condition it is testing is true, and not if the condition is ...

Discover More

Using the EOMONTH Function

If you need to determine the date of the last day in a month, it's hard to beat the flexibility of the EOMONTH function. ...

Discover More

Median of Selected Numbers

Need to find a median value in a series of values? It's easy with the MEDIAN function. What isn't as easy is to derive ...

Discover More

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

View most recent newsletter.


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. 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 1 + 5?

2016-11-29 10:27:48


@Stephen: first tip is great! I will use it now to comment my formulas.

2016-11-28 16:54:25

Stephen Barrett

Hi Allen

Greetings from New Zealand, I trust you are well.

There's a couple of other uses for the N function, which I discovered by accident:

1. It can be added at the end of any formula to store a useful comment.
eg =SUM(A1:A365)+N("all 2016 sales")

Because N("any text string") has a value of 0, it doesn't alter the SUM, but allows the comment to remain with the formula. I find this easier than the more intrusive Comment feature, and is an alternative to Named Ranges/Formulae.

2. As a security feature, of sorts.
eg =NetProfit/N(A1), where NetProfit is a named range, and cell A1 contains nothing, or some innocuous text, but allows the above formula to display the value of NetProfit when the value 1 is entered, almost like a password.

Before this, the formula will yield #DIV/0! and will appear to be an error, whereas it is a deliberate result until 'the password' is entered.

One variation of this is using a multiplier or divisor in the cell that N refers to, to deliberately disguise or alter results.

This is made even more obtuse by changing the text colour of the 'password cell' to white, so the password - the argument of N - can be hidden in plain view.

These approaches will baffle many people because many people are unaware of the existence of N. Of course, someone whose middle name is Sherlock will trace this quite quickly, but it's not for them ;)


2016-11-28 11:04:08


3/11/99, 37.14, TRUE and 5:40 could all be strings that only appear to be numbers, in which case the N function would return 0. Similarly, Quarter 1 could be a number formatted to appear as a string.

2016-11-28 07:29:31

Ken Varley

When using date examples, you should use a date that is not ambiguous.

In this tip, you give an example date of 3/11/99

Anyone in America reading this date will see it as 11th March

Anyone in England reading the date will read it as 3rd November

I appreciate that in this example it doesn't really matter, but if you used a date that was higher than 12th of the month (eg 15th), it would simplify the example by removing ambiguity

This Site

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.

Newest Tips

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.