傳回以數字形式提供的引數。
使用範本
N(A2)
N(4)
語法
N(值)
值
- 要轉換成數字的引數。IF
值
isTRUE
,N
returns1
.IF
值
is a number, the number is returned.IF
值
is a date or time,N
returns a generated serial number, based on the number of days since 30 December,- Negative values are interpreted as days before this date, and fractional values indicate time of day past midnight.
IF
值
isFALSE
or any value not listed above,N
returns0
.
附註
When using
N
on numeric values in other cells, formatting (into currencies, scientific notation, etc.) is lost. To specify formatting on the return value ofN
, simply apply the format desired to the cell containing the formula.This function is, in fact, rarely necessary as Google Spreadsheet automatically converts between most formats appropriately. IT 總算provided primarily for compatibility with formulas used in other spreadsheet packages.
另請參閱
TO_DATE
: 將指定數字轉換成日期。
T
: 傳回轉換成文字的字串引數。