The TEXT function in Excel is used to convert numbers to text in a specified format. This function is particularly useful for displaying numbers in a more readable or specific format, such as dates, times, currency, percentages, and more.
Syntax
Function | Syntax |
---|---|
TEXT | =TEXT(value, format_text) |
- value: The number or value you want to format.
- format_text: The format you want to apply to the value.
Example
Consider the following table to illustrate the use of the TEXT function:
Date | Amount |
---|---|
2024-01-15 | 2500 |
2024-02-20 | 3500 |
2024-03-10 | 4500 |
Steps:
- To display the date in the format "January 15, 2024", use the formula:
=TEXT(A2, "mmmm dd, yyyy")
. - To display the amount in currency format, use the formula:
=TEXT(B2, "$#,##0.00")
.
Practice Exercise 1
Task: Using the table below, convert the "Date" column to display in the format "dd-mm-yyyy".
Practice Exercise 2
Task: Using the table below, format the "Score" column to display with two decimal places.
Exercise 1 Solution
To convert the "Date" column to display in the format "dd-mm-yyyy":
Use the formula: =TEXT(A2, "dd-mm-yyyy")
.
Exercise 2 Solution
To format the "Score" column to display with two decimal places:
Use the formula: =TEXT(B2, "0.00")
.
By mastering the TEXT function in Excel, you can customize the display of your data, making it more readable and formatted to your specific needs. This enhances your ability to present and interpret data effectively.