Excel TEXT Function allows you to format numbers, dates, and times into text in a way that suits your needs. It’s like giving your data a new outfit. You can make numbers appear as currency, dates in a specific format, or create custom text patterns. Let’s dive into how to use this function.
Syntax
TEXT(value, format_text)
Arguments
value | The value you want to format into text. |
format_text | The format you want to apply to the value. This can be a number format, date format, or a custom text pattern. |
How to use
To use the TEXT function, follow this simple structure:
1 |
=TEXT(value, format_text) |
Here’s how you can use it with various examples:
Example 1: Format a Number as Currency
1 |
=TEXT(1234.567, "$#,##0.00") |
This formula formats the number 1234.567 as a currency with two decimal places, resulting in “$1,234.57.”
Example 2: Format a Date
1 |
=TEXT(DATE(2023, 11, 3), "mm/dd/yyyy") |
This formula formats the date November 3, 2023, as “11/03/2023.”
Example 3: Create Custom Text
1 |
=TEXT(42, "The answer is: #") |
This formula creates custom text, making “The answer is: 42.”
Example 4: Format Time
1 |
=TEXT(TIME(14, 30, 0), "hh:mm AM/PM") |
This formula formats the time 2:30 PM as “02:30 PM.”
Remember, the value can be any number, date, or time, and the format_text determines how it’s displayed. Excel TEXT Function is a versatile tool to present your data the way you want.