30 Excel functions in 30 days: N (N)

Yesterday in the marathon 30 Excel functions in 30 days we have identified the contents of the cell using the function TYPE (TYPE) and used it to check if a cell contains a number before doing the multiplication.

On the 22nd day of our marathon, we will study the function N (H). It is very similar to the function T (T), which we have already studied earlier, but does not work with text values, but with numeric ones.

So, let’s take a closer look at the information and examples on the function N (H). If you have additional information or examples of your own, please share them in the comments.

Function 22: N (Ch)

Function N (N) returns the value converted to a number.

How can the N(H) function be used?

Function N (H) is not widely used and can usually be replaced by other functions or operators. You can:

  • Return a number based on the cell value.
  • Use function alternatives N (Ch).
  • Add a hidden comment to a cell.

Syntax N (H)

Function N (H) has the following syntax:

N(value)

Ч(значение)

  • value (value) – can be text, a number, or any other value.

Traps N (H)

If the value is an error, then the function N (H) will return exactly the same error instead of a number. To deal with errors, use IFERROR (IFERROR) or ISNUMBER (ISNUMBER).

Example 1: Returning a Number Based on a Cell Value

Using functions N (H) You can return a number based on the value of a cell. If the cell contains a number, then the function will return the same number.

=N(C3)

=Ч(C3)

30 Excel functions in 30 days: N (N)

The following table shows what results the function will return. N (H) for possible values:

30 Excel functions in 30 days: N (N)

Example 2: Alternatives for the function N (N)

Instead of a function N (H) You can use the function ISNUMBER (ISNUMBER) to check if a cell contains a number.

=ISNUMBER(C3)

=ЕЧИСЛО(C3)

30 Excel functions in 30 days: N (N)

Or use two minus signs (double negative) to convert boolean values ​​TRUE/FALSE (TRUE/FALSE) or numbers in text format to numeric values.

=IFERROR(--C3,"")

=ЕСЛИОШИБКА(--C3;"")

30 Excel functions in 30 days: N (N)

Example 3: Adding a Hidden Comment to a Cell

If you need to add a hidden comment to a cell, you can use the function N (H). Since the result of the function N (H) for text will be zero, then adding such an entry will not change the final result of the cell.

Such a comment will only be visible in the formula bar when the cell containing it is selected.

=SUM(B3:C3)+N("Store01 closed in June")

=СУММ(B3:C3)+Ч("Store01 closed in June")

30 Excel functions in 30 days: N (N)

Leave a Reply