=TEXT(value, format_text)
=TEXT(A1,"dd-mmm-yy")
The TEXT function can be used to format a cell to a specific format. For example,this formula will return "1-Jul-2021" if July 1, 2021 is in cell A1.
=TEXT(A1,"The date is "&A1)
The TEXT function can also be used to format a cell to include text in the output. For example, the formula above will return "The date is 44378" if July 1, 2021 is in cell A1.
=TEXT(A1,"The date is "&TEXT(A1,"mmmm d"))
The TEXT function can also be used to format a cell to include both numbers and text. For example,this example will return "The date is July 1" if July 1, 2021 is in cell A1.
=TEXT(A1,"0.0%")
The TEXT function can also be used to format a cell to include a percentage. For example,this will return "53.7%" if 0.537 is in cell A1.
The TEXT function is used to format numbers and convert them to text. It takes a number as an input and returns it in a given number format as text.