1. Home
  2. Functions
  3. Text
  4. TEXT

TEXT function

Formats a number as text with a number format code, like "$#,##0.00" or "yyyy-mm-dd".

Syntax

=TEXT(value, format_text)

Arguments

ArgumentRequiredDescription
valueRequiredThe number (or numeric text) to format
format_textRequiredA number format code in quotes

How to use TEXT

TEXT takes 2 required arguments. Type =TEXT( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=TEXT(1234.567, "$#,##0.00")Result "$1,234.57"
=TEXT(0.285, "0.0%")Result "28.5%"
=TEXT(45292, "yyyy-mm-dd")Result "2024-01-01"

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.