Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. 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 14, 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, 2016, 2019, and Excel in Office 365. 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. ...


Turning Off ScreenTips

ScreenTips are one of those artifacts of Microsoft trying to make Excel be overly helpful. If the ScreenTips bother you, ...

Discover More

Backing Up Quick Access Toolbars

The Quick Access Toolbar is a place where you can easily put your customizations. If you want to back up that toolbar ...

Discover More

Incorrect Suggested Correction

As you type your document, Word flags words and phrases it thinks may be incorrect. The source of these various flaggings ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 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

Returning the MODE of a Range

The MODE function is used to determine the most frequently recurring value in a range. This tip explains how to use the ...

Discover More

Finding the Nth Root of a Number

Finding a square root is easy because Excel provides a worksheet function for that purpose. Finding a different root may ...

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 nine more than 3?

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.