N

Formulas / N
Convert a value to a number.
N(value)
  • value - required argument to convert

Examples

  • =N("apple")

    The N function is used to convert non-numeric values into numeric values. For example, the statement above returns 0, because the string "apple" is not a number.

  • =N(100)

    The N function can also be used to convert numeric values into numbers. For example, this returns 100, because 100 is a number.

  • =N(5/0)

    The N function will return an error message if the argument is undefined. For example, this returns the error message #DIV/0!, because dividing by 0 is undefined.

  • =N(TRUE)

    The N function can also be used to convert logical values into numbers. For example, this returns 1, because TRUE is equivalent to 1 in Sourcetable.

  • =N(3>1)

    The N function can also be used to convert comparison operators into numbers. For example, this returns 1, because the comparison 3>1 is true.

Summary

The N function is a useful tool for converting values to numbers, and is compatible with other spreadsheet programs. It can also return dates in a built-in date format if the argument is a date.

  • The N function converts TRUE and FALSE to 1 and 0, and text to zero. This is for compatibility with other spreadsheet programs.
  • The N function is unnecessary most of the time, as Sourcetable is able to recognize TRUE and FALSE and text values.
  • The N function removes text values.


Frequently Asked Questions

What is the N function?
The N function is a built-in function used in spreadsheet programs that converts a value to a numerical representation. This is particularly useful when working with data that has been imported from a text file.
What spreadsheet programs support the N function?
The N function is supported in most popular spreadsheet programs, including Microsoft Excel, Google Sheets, and Apple Numbers.
What types of values can the N function convert?
The N function can be used to convert the following types of values to numerical representations:
  • Strings
  • Booleans
  • Null values
  • Date and time values
What is the syntax for the N function?
The syntax for the N function is N(value). The value can be a string, a boolean, a null value, or a date or time value. The function will return a numerical representation of the value.
Sourcetable Logo

Work smarter

Al is here to help. Leverage the latest models to
analyze spreadsheets, enrich data, and create reports.

Drop CSV