[Excel function] Text function for text processing

In Excel, the TEXT function is used to convert data in numeric or date format into text format so that it can be displayed in a specific text format in a cell. The syntax of the TEXT function is as follows.

  • TEXT(value to be formatted, "format")
    • Value to format: This is the numeric value or date that you want to convert to text.       
    • format: This is a text string that specifies the format to be applied to the value. The format can be number format, date format, time format, etc. The specific format depends on your needs.

The following are some Text function application cases. A1 here refers to cell A1.

1. Convert numbers to currency type format

        =TEXT(A1, "$#,##0.00")

2. Format the date into month-date-year format

        =TEXT(A1, "mm-dd-yyyy")

3. Format the time into hour and minute format

        =TEXT(A1, "hh:mm")

4. Format decimals into percentage numbers

        =TEXT(A1, "0.00%")

Of course, Text will play a greater role in actual application cases. The following is the format data type of Text.


number

Guess you like

Origin blog.csdn.net/fogyisland2000/article/details/132783158