{
  "category": "Text functions",
  "display_name": "TEXT",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.TEXT",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20527"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 7,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 7,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 7 in the answer bank and 1,389 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 1,396 recorded answers",
    "workbook_corpus": {
      "cells": 1389,
      "matched": 1389
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/text_format.rs#L922-L922"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/text_format::profile",
        "catalogue/text_format::rendered",
        "catalogue/text_format::text",
        "decimal::low32",
        "decimal::Natural::zero",
        "decimal::Natural::from_u64",
        "decimal::Natural::pow10",
        "decimal::Natural::normalize",
        "decimal::Natural::is_zero",
        "decimal::Natural::mul_add_small",
        "decimal::Natural::times_pow10",
        "decimal::Natural::times_pow5",
        "decimal::Natural::times_pow2",
        "decimal::ExactDecimal::read",
        "decimal::ExactDecimal::binary",
        "format/datetime::has_invalid_exponent",
        "format/datetime::looks_like_datetime_format",
        "format/datetime::without_subseconds",
        "format/datetime::render_with_datetime_tokens",
        "format/datetime::tokenize_datetime_format",
        "format/datetime::elapsed_token_at",
        "format/datetime::classify_minute_tokens",
        "format/datetime::token_kind",
        "format/datetime::is_time_neighbor",
        "format/datetime::push_literal",
        "format/datetime::render_datetime_literal",
        "format/datetime::format_elapsed",
        "format/datetime::TimeParts::from_serial",
        "format::measured_host",
        "format::currency_literal",
        "format::digits",
        "format::fifteen",
        "format::split",
        "format::grouped",
        "format::general",
        "format::significant",
        "format::sections",
        "format::bracket",
        "format::is_condition",
        "format::is_elapsed",
        "format::condition_holds",
        "format::condition_of",
        "format::strip_tokens",
        "format::choose",
        "format::items",
        "format::numeric",
        "format::literal_text",
        "format::integer_part",
        "format::fraction_part",
        "format::scientific",
        "format::fraction_code",
        "format::FractionCode::render",
        "format::mixed_fraction_under_space_grouping",
        "format::convergent",
        "format::text_declared_date_locale",
        "format::text",
        "format::text_of_text",
        "format/names::month_name",
        "format/names::weekday_name",
        "format/names::locale_names",
        "locale::LocaleId::from_bcp47_language_tag",
        "locale::LocaleId::from_excel_lcid",
        "locale::short_date_order",
        "locale::short_date_pattern",
        "locale::currency_placement",
        "locale::currency_spacing",
        "locale::currency_negative_pattern",
        "locale::format_profile",
        "locale::days_from_civil",
        "locale::civil_from_days",
        "locale::ymd_from_excel_serial",
        "number_text::decimal",
        "number_text::first_precision",
        "number_text::near_tie",
        "number_text::first_rounding",
        "number_text::rounded",
        "number_text::increment",
        "number_text::ascii",
        "ported/date_kernels::whole_serial",
        "ported/date_kernels::whole",
        "ported/date_kernels::weekday_sunday_one_based",
        "ported/date_kernels::remap_weekday",
        "ported/date_kernels::weekday_of",
        "ported/date_kernels::weekday",
        "ported/text_kernels::text",
        "ported/text_kernels::text_from_str",
        "ported/text_kernels::date_integer_floor",
        "ported/text_kernels::push_singleton_or_original",
        "ported/text_kernels::push_upper",
        "ported/text_kernels::upper"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/text_format.rs#L922-L922",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 1,396 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.TEXT.json",
  "name": "TEXT",
  "notes": [
    {
      "basis": "Four recorded readings of the same value.",
      "documentation": null,
      "evidence": [
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": "sheets qt169 to qt172",
          "note": "recorded readings",
          "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
          "repository": "DnaCalc"
        },
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": "recorded_dollar_retains_a_negative_sign_after_rounding",
          "note": "DOLLAR readings pinned",
          "path": "apps/dna-onecalc/tests/acceptance.rs",
          "repository": "DnaCalc"
        }
      ],
      "functions": [
        "FUNC.DOLLAR",
        "FUNC.FIXED",
        "FUNC.TEXT"
      ],
      "inferred": null,
      "kind": "quirk",
      "note_id": "FN-DOLLAR-001",
      "open": [],
      "recorded_on": "2026-11-04",
      "repros": [
        {
          "call": "=DOLLAR(-0.005,0)",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "-R0",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt172, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=FIXED(-0.005,0)",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "0",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt171, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=TEXT(-0.005,0)",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "0",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt169, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=TEXT(-0.005,\"0\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "0",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt170, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        }
      ],
      "schema": "efh.function-note/v1",
      "statement": "-0.005 rounded to no decimals is zero. DOLLAR(-0.005,0) shows that as -R0 in en-ZA settings, keeping the sign of the input, while FIXED(-0.005,0), TEXT(-0.005,0) and TEXT(-0.005,\"0\") show 0.",
      "status": "measured",
      "title": "DOLLAR keeps the minus sign on an amount that rounds to zero; FIXED and TEXT drop it"
    },
    {
      "basis": "170 recorded TEXT readings on one TEXT sheet.",
      "documentation": null,
      "evidence": [
        {
          "commit": "f4930602d7b2f49cce13fb1bd030f7df2937adfa",
          "locator": "locale_tagged_date_names_follow_the_retained_fn3_readings",
          "note": "recorded readings pinned",
          "path": "apps/dna-onecalc/tests/acceptance.rs",
          "repository": "DnaCalc"
        }
      ],
      "functions": [
        "FUNC.TEXT"
      ],
      "inferred": null,
      "kind": "quirk",
      "note_id": "FN-TEXT-001",
      "open": [
        "Era readings cover Heisei and Reiwa only. Earlier Japanese eras have not been read."
      ],
      "recorded_on": "2026-11-04",
      "repros": [
        {
          "call": "=TEXT(DATE(2023,3,15),\"[$-407]mmm\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "Mrz",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "eceb809985e244e9d0a20f905e58fe57b8741ed8",
            "locator": "sheet fn3_text, row 6, column 4",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn3_questions/oracle.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=TEXT(DATE(2023,1,15),\"[$-411]mmm\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "1",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "eceb809985e244e9d0a20f905e58fe57b8741ed8",
            "locator": "sheet fn3_text, row 78, column 4",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn3_questions/oracle.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=TEXT(DATE(2019,5,1),\"[$-411]ggge\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "令和1",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "eceb809985e244e9d0a20f905e58fe57b8741ed8",
            "locator": "sheet fn3_text, row 164, column 4",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn3_questions/oracle.capture.json",
            "repository": "DnaCalc"
          }
        }
      ],
      "schema": "efh.function-note/v1",
      "statement": "With a locale tag in the format, TEXT's names differ from common locale data. [$-407] (German) gives mmm for March as Mrz, while mmmm gives März. [$-411] (Japanese) gives mmm as a bare number, 1, while mmmm gives 1月. [$-419] (Russian) capitalises mmmm (Январь) but not mmm (янв), and capitalises ddd (Ср) but not dddd. The first year of the Reiwa era prints as 1, not 元年; g, gg and ggg give R, 令 and 令和, switching on 2019-05-01.",
      "status": "measured",
      "title": "Locale-tagged month, weekday and era names in TEXT follow their own table"
    },
    {
      "basis": "30 recorded readings: six numbers against the formats @, General, quoted @, @! and 0;0;0;@. @ and @! equalled General for all six numbers.",
      "documentation": null,
      "evidence": [
        {
          "commit": "179455f24c41c6fa91cada729b5982acb3a6aa77",
          "locator": "delivered_fn4_numeric_text_placeholders_use_general_display",
          "note": "recorded answers pinned",
          "path": "apps/dna-onecalc/tests/acceptance.rs",
          "repository": "DnaCalc"
        },
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": "sheets qt001 to qt030",
          "note": "30 recorded readings",
          "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
          "repository": "DnaCalc"
        }
      ],
      "functions": [
        "FUNC.TEXT"
      ],
      "inferred": null,
      "kind": "quirk",
      "note_id": "FN-TEXT-002",
      "open": [
        "Formats mixing @ with digit placeholders have not been read."
      ],
      "recorded_on": "2026-11-04",
      "repros": [
        {
          "call": "=TEXT(123456789012345,\"@\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "1.23457E+14",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt001, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=TEXT(123456789012345,\"General\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "1.23457E+14",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt002, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=TEXT(1234567890.5,\"@\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "1234567891",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt011, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=TEXT(123456789012345,\"\"\"@\"\"\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "@",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt003, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=TEXT(-123456789012345,\"\"\"@\"\"\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "-@",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt008, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=TEXT(123456789012345,\"0;0;0;@\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "123456789012345",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt005, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=TEXT(-123456789012345,\"0;0;0;@\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "123456789012345",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt010, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        }
      ],
      "schema": "efh.function-note/v1",
      "statement": "A format of @ or @! on a number gives what General gives, not the digits of the number. TEXT(123456789012345,\"@\") is 1.23457E+14 and TEXT(1234567890.5,\"@\") is 1234567891. A quoted @ is a literal: TEXT(x,\"\"\"@\"\"\") is @ for a positive x, and -@ for a negative one, because the ordinary sign rule applies. In a format with four sections, @ is the text section and numbers use the others: TEXT(123456789012345,\"0;0;0;@\") shows all 15 digits, and TEXT(-123456789012345,\"0;0;0;@\") shows them with no minus sign, because the second section has none.",
      "status": "measured",
      "title": "In TEXT, an @ applied to a number gives the General display, not the full number"
    }
  ],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n### Relationships\n\n- **`VALUE`** is the inverse direction, and **[NUMBERVALUE](FUNC.NUMBERVALUE.md)** is the\n  locale-independent inverse. The asymmetry is worth stating: the parse direction has an\n  explicit-separator escape hatch, the format direction does not.\n- **[T](FUNC.T.md)** is the function readers confuse with this one on the strength of its\n  catalogue description. `T` is a type filter that returns `\"\"` for a number; `TEXT` renders a\n  number. They have nothing in common.\n- **`TEXTJOIN`, `CONCAT`, `&`** consume `TEXT` output constantly — building a sentence around a\n  formatted figure is the function's most common use.\n- **Cell number formatting** is the alternative that is usually correct: if the goal is\n  appearance rather than a text value, format the cell and leave the number a number.\n- `TEXT` is not a Compatibility-category function and is not superseded.\n\n\n",
    "how-to-implement": "\n### Notes for implementers\n\nThe rounding rule at the format boundary needs to be established before anything else, because\nit is the part that produces silently wrong numbers rather than visibly wrong strings.\nRendering is the easy half of this function; deciding the last digit is the hard half.\n\nSection selection — positive / negative / zero / text — is a per-format parse, not a per-value\nbranch, and the number of sections present changes the meaning of the ones that are there. That\nparse has to happen once per format string, not once per value, or performance and semantics\nboth suffer.\n\n\n",
    "quirks": "\n### The locale problem\n\n\n`format_text` is a **string interpreted in a language**, and this bites harder than any other\nproperty of the function.\n\nThe characters that mean \"decimal separator\" and \"group separator\" in a format code are the\nones the workbook's language uses, not fixed `.` and `,`. A format literal that produces\n`1.234,56` in one language setting produces something else, or nothing useful, in another —\nand the format string is stored in the formula verbatim, so the workbook carries a\nlanguage-specific literal across every machine it is opened on. The same is true of the date\nand time code letters, which are localized: the code for \"year\" is not `y` everywhere.\n\nThis is not a hypothetical fragility. It is why the number-format guidance Microsoft's `TEXT`\npage links documents locale-identifier prefixes in the `[$-...]` form for pinning a format to a\nspecific language regardless of the host.\n\nTwo independent signals in the Handbook's own data agree that this dependence is structural\nrather than incidental:\n\n`TEXT` is therefore the mirror image of [NUMBERVALUE](FUNC.NUMBERVALUE.md), which exists\nprecisely so that the *parsing* direction can escape locale dependence. There is no equivalent\nescape hatch in the formatting direction: `TEXT` has no separator arguments, and pinning the\nlocale means embedding a locale identifier in the format string.\n\n\n\n### Result and edge cases\n\n\nReturns `Text`.\n\nOpen rather than settled, because Microsoft's page does not address them:\n\n- **Text `value`.** Passed through, formatted by the `@` section, or `#VALUE!` — unverified.\n- **Empty `format_text`.** An empty format string is legal in the Format Cells dialog, where it\n  hides the value; whether `TEXT(1, \"\")` returns the empty string is unverified.\n- **Logical `value`.** Whether `TRUE` coerces to 1 and formats, or renders as `TRUE`.\n- **Unsupported codes.** The page states that not all format codes are supported, but does not\n  say what an unsupported code does — error, ignore, or literal.\n- **Rounding.** `TEXT(0.5, \"0\")` requires a rounding decision at the format boundary, and which\n  rule applies (half-up, half-even, or the display rounding the cell formatter uses) is not\n  stated. This is the single most numerically consequential unanswered question on the page.\n\n\n### Errors\n\n\nMicrosoft's `TEXT` page carries no error table. The reachable errors are the shared ones: an\nerror value in either argument propagates, and a value that cannot convert to the expected kind\nsurfaces `#VALUE!` under the shared coercion rules. Whether an invalid or unsupported\n`format_text` produces `#VALUE!` is unverified and is on the probe list.\n\n\n",
    "sources": "\n- Microsoft, \"TEXT function\" —\n  <https://support.microsoft.com/en-us/office/text-function-20d5ac4d-7b94-49fd-bb38-93d29371225c>\n  (signature, argument meanings, the format-code guidance it links, the note that not all\n  format codes are supported, and the warning that the result is text).\n- Handbook, [Coercion and lifting](../model/02-coercion-and-lifting.md) — to-text conversion\n  stated as outline-level, and the locale-dependent surface of number recognition flagged there\n  as an open area.\n- Handbook, [The value universe](../model/01-value-universe.md) — dates and currency as numbers\n  wearing formats, and the presentation-hint model that keeps formatting out of value identity.\n- Handbook projections `data/functions/FUNC.TEXT.json` (classification: locale-profile\n  dependency, composite surface dependency), `data/presence/FUNC.TEXT.json` (implementing\n  modules and the `BUG-FUNC-028` defect stream), and `data/battery/FUNC.TEXT.json` (rows\n  reported as not dispatchable without a host facility).\n\n",
    "version-differences": "No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.",
    "what-it-does": "\n`TEXT(value, format_text)` applies a number format code to `value` and returns the formatted\nrendering as a text string.\n\nThe important structural fact is that `format_text` is written in the **same number-format\nlanguage as the Format Cells dialog** — the `0`, `#`, `?`, `.`, `,`, `%`, `E+`, `@` placeholder\nvocabulary, the four semicolon-separated sections for positive / negative / zero / text, the\n`[...]` condition and colour clauses, and the date and time codes. `TEXT` is not a small\nformatting helper with its own mini-language; it is the cell-formatting engine exposed as a\nfunction, and Microsoft's page documents it by pointing at the number-format guidance rather\nthan by listing a closed grammar. Its own note is that it does not support every format code.\n\nThe difference from cell formatting is what happens to the result. A formatted cell holds a\nnumber and *displays* it formatted; `TEXT` produces an actual text value. Everything downstream\nchanges accordingly — sorting, comparison, arithmetic, lookups. Microsoft flags this on the\npage: converting numbers to text can make them hard to reference in later calculations. The\ncommon mistake is using `TEXT` to make a number look right when the intent was a cell format.\n\n\n\n### Arguments\n\n\n| Argument | Meaning |\n|---|---|\n| `value` | The value to format. Required. Documented as a numeric value. |\n| `format_text` | The number-format code, as a text string. Required. |\n\nBoth are required; there is no default format.\n\n`format_text` must be quoted text or a reference to text. A bare `TEXT(A1, 0)` passes the\n*number* zero where a format string is expected, and what happens then is a coercion question,\nnot a formatting one — see [Coercion and lifting](../model/02-coercion-and-lifting.md).\n\nThe commonly misunderstood position is `value`: the documentation describes it as numeric, but\nnumber formats have a fourth, text section (`@`). In a four-section format numbers use the other\nsections, while a lone `@` applied to a number gives the General display (FN-TEXT-002). What\n`TEXT` does with a text `value` under a format with and without an `@` section is not something\nthis page can state.\n\n\n"
  },
  "signature": {
    "display": "TEXT(value, format_text)",
    "parameters": [
      {
        "description": null,
        "name": "value",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "format_text",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 2,
        "min": 2
      },
      "category": "Text functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "LocaleProfile",
        "host_interaction_class": "None",
        "kernel_signature_class": "Custom",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "Composite",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "A value as text, in a number format",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Formats a number and converts it to text",
        "microsoft_url": "https://support.microsoft.com/en-us/office/text-function-20d5ac4d-7b94-49fd-bb38-93d29371225c"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "TEXT"
        },
        {
          "locale": "bg-BG",
          "name": "TEXT"
        },
        {
          "locale": "cs-CZ",
          "name": "TEXT"
        },
        {
          "locale": "da-DK",
          "name": "TEXT"
        },
        {
          "locale": "de-DE",
          "name": "TEXT"
        },
        {
          "locale": "el-GR",
          "name": "TEXT"
        },
        {
          "locale": "en-AU",
          "name": "TEXT"
        },
        {
          "locale": "en-GB",
          "name": "TEXT"
        },
        {
          "locale": "en-US",
          "name": "TEXT"
        },
        {
          "locale": "es-ES",
          "name": "TEXT"
        },
        {
          "locale": "et-EE",
          "name": "TEXT"
        },
        {
          "locale": "fi-FI",
          "name": "TEKSTI"
        },
        {
          "locale": "fr-FR",
          "name": "TEXT"
        },
        {
          "locale": "he-IL",
          "name": "TEXT"
        },
        {
          "locale": "hr-HR",
          "name": "TEXT"
        },
        {
          "locale": "hu-HU",
          "name": "TEXT"
        },
        {
          "locale": "id-ID",
          "name": "TEXT"
        },
        {
          "locale": "it-IT",
          "name": "TEXT"
        },
        {
          "locale": "ja-JP",
          "name": "TEXT"
        },
        {
          "locale": "ko-KR",
          "name": "TEXT"
        },
        {
          "locale": "lt-LT",
          "name": "TEXT"
        },
        {
          "locale": "lv-LV",
          "name": "TEXT"
        },
        {
          "locale": "nb-NO",
          "name": "TEXT"
        },
        {
          "locale": "nl-NL",
          "name": "TEXT"
        },
        {
          "locale": "pl-PL",
          "name": "TEXT"
        },
        {
          "locale": "pt-BR",
          "name": "TEXT"
        },
        {
          "locale": "pt-PT",
          "name": "TEXT"
        },
        {
          "locale": "ro-RO",
          "name": "TEXT"
        },
        {
          "locale": "ru-RU",
          "name": "TEXT"
        },
        {
          "locale": "sk-SK",
          "name": "TEXT"
        },
        {
          "locale": "sl-SI",
          "name": "TEXT"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "TEXT"
        },
        {
          "locale": "sv-SE",
          "name": "TEXT"
        },
        {
          "locale": "th-TH",
          "name": "TEXT"
        },
        {
          "locale": "tr-TR",
          "name": "METNEÇEVİR"
        },
        {
          "locale": "uk-UA",
          "name": "TEXT"
        },
        {
          "locale": "vi-VN",
          "name": "TEXT"
        },
        {
          "locale": "zh-CN",
          "name": "TEXT"
        },
        {
          "locale": "zh-HK",
          "name": "TEXT"
        },
        {
          "locale": "zh-TW",
          "name": "TEXT"
        }
      ],
      "signature": {
        "display": "TEXT(value, format_text)",
        "parameters": [
          {
            "description": null,
            "name": "value",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "format_text",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "TEXT",
      "version_marker": null,
      "xlcall": {
        "code": "48",
        "symbol": "xlfText"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/text-function-20d5ac4d-7b94-49fd-bb38-93d29371225c"
  },
  "try_it": {
    "formula": "=TEXT(1234.5,\"0.00\")"
  },
  "url": "https://handbook.dnacalc.com/functions/TEXT.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "=TEXT(-0.005,0) returned 0. =TEXT(-0.005,\"0\") returned 0. 10 further recorded controls are attached. Inputs were supplied through formula literals. These are controls from this environment, not a same-input comparison with another build.",
      "excel_build": "16.0.20527.20088",
      "observations": [
        {
          "call": "=TEXT(-0.005,0)",
          "excel": {
            "bits": null,
            "display": "0",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        },
        {
          "call": "=TEXT(-0.005,\"0\")",
          "excel": {
            "bits": null,
            "display": "0",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        },
        {
          "call": "=TEXT(DATE(2023,3,15),\"[$-407]mmm\")",
          "excel": {
            "bits": null,
            "display": "Mrz",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        },
        {
          "call": "=TEXT(DATE(2023,1,15),\"[$-411]mmm\")",
          "excel": {
            "bits": null,
            "display": "1",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        },
        {
          "call": "=TEXT(DATE(2019,5,1),\"[$-411]ggge\")",
          "excel": {
            "bits": null,
            "display": "令和1",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        },
        {
          "call": "=TEXT(123456789012345,\"@\")",
          "excel": {
            "bits": null,
            "display": "1.23457E+14",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        },
        {
          "call": "=TEXT(123456789012345,\"General\")",
          "excel": {
            "bits": null,
            "display": "1.23457E+14",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        },
        {
          "call": "=TEXT(1234567890.5,\"@\")",
          "excel": {
            "bits": null,
            "display": "1234567891",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        },
        {
          "call": "=TEXT(123456789012345,\"\"\"@\"\"\")",
          "excel": {
            "bits": null,
            "display": "@",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        },
        {
          "call": "=TEXT(-123456789012345,\"\"\"@\"\"\")",
          "excel": {
            "bits": null,
            "display": "-@",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        },
        {
          "call": "=TEXT(123456789012345,\"0;0;0;@\")",
          "excel": {
            "bits": null,
            "display": "123456789012345",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        },
        {
          "call": "=TEXT(-123456789012345,\"0;0;0;@\")",
          "excel": {
            "bits": null,
            "display": "123456789012345",
            "kind": "text"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA"
        }
      ],
      "platform": "Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/3345a87/content/notes/FN-DOLLAR-001.json",
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/3345a87/content/notes/FN-TEXT-001.json",
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/3345a87/content/notes/FN-TEXT-002.json"
      ]
    }
  ]
}