N Function

N Function

N Function

Converts a value to a number. Numbers stay the same, TRUE becomes 1, FALSE becomes 0, and text becomes 0.

ExcelClash Team
PUBLISHED

Summary

The Excel N function converts a value to a number. If the value is already a number, N returns that number. If the value is TRUE, N returns 1. If it is FALSE or text, N returns 0.

N can also return the serial number of a date, because Excel stores dates as numbers internally. If the input is an error value, N returns the same error. Microsoft notes that N is mainly provided for compatibility, because Excel usually converts values automatically when needed.

Purpose

Convert a value to a number

Turns different kinds of values into a numeric result when possible.

Return Value

A number or an error

Returns a number, 1, 0, a date serial, or the original error value.

Syntax

=N(value)

N takes one argument: the value you want to convert. That value can be a number, text, a logical value, a date, or a reference to a cell containing one of those values.

Arguments

  • value - [Required] The value or cell reference you want to convert to a number.

How N Converts Values

The result depends on the type of value you pass into the function.

Input Type Example N Result
Number 123 123
Date TODAY() The date serial number
TRUE TRUE 1
FALSE FALSE 0
Text "hello" 0
Error #DIV/0! The same error

Using N

N is not a common everyday function, but it still appears in a few useful patterns. One pattern is converting logical tests into numbers, such as turning TRUE and FALSE into 1 and 0. Another is adding text comments inside a formula with N("note"), because text passed to N becomes 0 and does not change the calculation.

It is also important to know what N does not do. It does not turn text like "7" into the number 7. Because that input is still text, N returns 0. It also does not suppress errors. If you pass an error into N, the error stays an error.

  • Use N when you want TRUE and FALSE to behave like 1 and 0.
  • Use N("comment") inside a formula when you want to add a note that does not affect the numeric result.
  • Do not use N as a general text-to-number converter. It returns 0 for ordinary text.

Example 1 - Returning a Number Unchanged

If the input is already numeric, N simply returns it. This is the simplest case and also the least interesting one, but it helps show that N does not alter normal numeric values.

=N(100)   // Returns 100
=N(A1)    // If A1 contains 123, returns 123
Check Answer
Challenge #1
Target: Sheet1!F1
Return a Number

In cell F1, use N on A1. Since A1 contains 123, the result should stay 123.

Example 2 - Converting Logical Values to 1 or 0

This is one of the most practical uses of N. It turns logical values into numbers, which can then be summed, averaged, or used in arithmetic formulas.

=N(TRUE)   // Returns 1
=N(FALSE)  // Returns 0
Check Answer
Challenge #3
Target: Sheet1!F3
Convert TRUE to 1

In cell F3, use N(TRUE). Expected result: 1.

Example 3 - Converting Text to 0

When the input is plain text, N returns 0. That behavior can be useful in a narrow set of formulas, but it also means N is not a replacement for proper type conversion tools.

=N("Manual Note") // Returns 0
=N(B1)            // If B1 contains "hello", returns 0
Check Answer
Challenge #2
Target: Sheet1!F2
Convert Text to 0

In cell F2, use N on B1. Since B1 contains text, the result should be 0.

Example 4 - Adding a Hidden Comment to a Formula

This is a classic N trick. Because text becomes 0, you can place a note inside the formula and keep the result unchanged. The note remains visible in the formula bar for anyone reviewing the workbook.

=A1 + N("Reviewed by QA")
// Returns the same result as =A1, because N("Reviewed by QA") returns 0
Check Answer
Challenge #4
Target: Sheet1!F4
Use N in an IF Check

In cell F4, use IF with N(B1) to label the text value in B1 as "String".

Remember that N passes errors through unchanged. If the input is #DIV/0!, #N/A, or another error, N returns that same error. If you need to replace errors with 0, use IFERROR around the formula instead.

Conclusion Recap

  • Summary: N converts values to numbers when possible.
  • Syntax: =N(value).
  • Key point: Text becomes 0, but error values stay as errors.
  • Practical usage: Boolean-to-number conversion and hidden formula comments.
  • Best rule: Use N for compatibility-style numeric conversion, not as a general-purpose text-to-number tool.
Tactical Arena
Select Scenario:
Share N Function!

Tell your friends about this post

Discussion

ExcelClash is an interactive platform designed to level up your Excel skills through real-world exercises and challenges. Sharpen your logic, solve real spreadsheet problems, and learn faster.

© 2026 ExcelClash, Inc. All rights reserved.