Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. 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 July 2, 2018)


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/17/19 43541
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, 2013, and 2016. 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. ...


Duplicating Styles without Dependency

Creating new styles in Word is a great way to ensure that your document has a uniform look. But what if you want to ...

Discover More

Understanding Storage Spaces

Need to add some addition drive space to your system? Why not consider adding what Microsoft calls a "storage space?" ...

Discover More

Word Count in Multiple Selections

Getting a word count for an entire document is easy. What you may not know is that some versions of Word can also provide ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Determining the Least Common Multiple

Need to figure out the least common multiple of a range of values? It is a snap when you use the LCM function, described ...

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

Modifying Proper Capitalization

The PROPER worksheet function is used to change the case of text so that the first letter of each word is capitalized. If ...

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 four more than 2?

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.