To convert a number into a text, use the Text function, which is useful if you want to combine text with symbols such as: currency symbols, percentages, etc. example below to better understand.
Syntax: =TEXT (value, format_text)
The TEXT function syntax has the following arguments:
- Value – the numeric value to be converted to text. It can be a number, date, reference to a cell containing a numeric value or another function that returns a number or date.
- Format_text – the format that you want to apply. It is supplied in the form of a format code enclosed in the quotation marks, e.g. “mm/dd/yy”.
The format definitions that can be used in the Excel Text function are shown in the table below. These definitions have the same meaning when used in the custom style of Excel Cell Formatting.
– | Forces the display of a digit in its place | |
# | – | Display digit if it adds to the accuracy of the number (but don’t display if a leading zero or a zero at the end of a decimal) |
. | – | Defines the position that the decimal place takes |
d | – |
|
m | – |
|
y | – |
|
h | – |
|
m | – |
|
s | – |
|
AM/PM | – | Indicates that a time should be represented using a 12-hour clock, followed by “AM” or “PM” |
Example: Let’s look at some Excel text function examples and explore how to use the text function as a worksheet function in Microsoft Excel:
Syntax: =TEXT(B2,”ddd”)
Result:
=WEEKDAY(A3)
Result: Fri
=WEEKDAY(A4)
Result: Sat
=WEEKDAY(A5)
Result: Sun
=WEEKDAY(A6)
Result: Mon
=WEEKDAY(A7)
Result: Tue
=WEEKDAY(A8)
Result: Wed
=WEEKDAY(A9)
Result: Thu
=WEEKDAY(A10)
Result: Mon
=WEEKDAY(A11)
Result: Fri