TEXT


Converts a number into text according to a given format.

Syntax:

TEXT(number, format)

returns number converted to text, according to the format code specified by format.


Example:

TEXT(12.34567, "###.##")

returns the text 12.35, if in your locale ###.## is a format code meaning "up to three integer digits and at most two decimal digits".


Application:

An application of the TEXT function is to format dates from a raw data set into a specific, more user-friendly format. This is particularly useful when the original data is a mix of different date formats, or you want to present the data in a standardized way for reporting or display.


Table:

Raw Date

TEXT function

Formatted Date

A
B
C
1
4/15/2025
TEXT(A1, "dddd mmmm d, yyyy")
Tuesday April 15, 2025
2
2/8/2025
TEXT(A2, "dddd mmmm d, yyyy")
Saturday February 8, 2025
3
10/22/2025
TEXT(A3, "dddd mmmm d, yyyy")
Wednesday October 22, 2025
4
6/1/2025
TEXT(A4, "dddd mmmm d, yyyy")
Sunday June 1, 2025

Explanation:

  • Column A: Raw Date: This is the original data, stored as a serial number but displays as a date.
  • Column B: TEXT Function: This is the formula being used.
    • TEXT(A1, ...): The function takes two arguments. The first is the value you want to format (in this case, the date in cell A1).
    • ... ,"dddd, mmmm d, yyyy"): The second argument is the format_text. This is a string that tells how to display the value.
      • dddd: Displays the full name of the day of the week (e.g., "Tuesday").
      • mmmm: Displays the full name of the month (e.g., "April").
      • d: Displays the day of the month without a leading zero (e.g., "15").
      • yyyy: Displays the four-digit year (e.g., "2025").
  • Column C: Formatted Date: This is the result of the TEXT function. As you can see, the raw, standard date has been converted into a more readable and descriptive format.




This page is protected by Google reCAPTCHA. Privacy - Terms.
 
Built using Zapof