根據指定格式將數字轉換成文字。
使用範本
TEXT(1.23,"$0.00")
TEXT(A2,"#.###")
TEXT(24,"#.0?")
TEXT(DATE(1969,7,20),"yyyy-MM")
語法
TEXT(數字, 格式)
number要轉換成其他格式的數字、日期或時間。格式轉換數字時要採用的模式 (刮在引號中)。 quotation marks.0forces display of zeros if a number has fewer digits than the format specifies. 舉例來說,TEXT(12.3,"000.00")produces012.30. Numbers which have more digits to the right of the decimal point than the pattern are rounded to the indicated number of places. 舉例來說,TEXT(12.305,"00.00")results in12.31.#is similar to0but does not force the display of zeros on either side of the decimal point. 舉例來說,TEXT(12.3,"###.##")produces12.3.
附註
發生瀏覽後轉換之後,(DFA) Floodlight 銷售廣告代碼所傳送的
格式的引數撰寫訊息中...cannot contain an asterisk (*).撰寫訊息中...does not support the?pattern in Google Sheets.撰寫訊息中...does not support fractional format patterns.撰寫訊息中...supports the following date and time patterns:日for the day of the month as one or two digits.ddfor the day of the month as two digits.dddfor the short name of the day of the week.ddddfor the full name of the day of the week.mfor the month of the year as one or two digits or the number of minutes in a time. Month will be used unless this code is provided with hours or seconds as part of a time.mmfor the month of the year as two digits or the number of minutes in a time. Month will be used unless this code is provided with hours or seconds as part of a time.mmmfor the short name of the month of the year.mmmmfor the full name of the month of the year.mmmmmfor the first letter in the month of the year.YYfor the year as two digits.yyyyfor the year as four digits.H時for the hour on a 24-hour clock.H時for the hour on a 12-hour clock.ssfor the seconds in a time.ss.000for milliseconds in a time.上午/下午for displaying hours based on a 12-hour clock and showing AM or PM depending on the time of day.
Note that the date/time patterns and
#or0cannot be mixed.
另請參閱
T: 傳回轉換成文字的字串引數。
FIXED: 將數字轉換成固定小數位數。
DOLLAR: 將數字轉換成指定語言版本的貨幣格式。