JMWINCDevelopers

Tutorials & Guides

The TEXT function: format numbers and dates as text

Cell formatting changes how a number looks, but the moment you join it into a sentence or a filename, the formatting drops and you get a raw serial number. The TEXT function bakes the format into the value itself.

The formula

=TEXT(value, "format_code")

The format code is the same syntax you'd type in Format Cells → Custom:

Where it earns its keep

Joining values into a label or a report title:

="Reconciliation — "&TEXT(A2,"mmm yyyy")

…gives Reconciliation — Oct 2026 instead of Reconciliation — 46296. Same idea for building consistent filenames (2026-10_North_report) or merging an amount into a sentence for an email.

Remember

TEXT returns text, not a number — you can't sum its output. Use it for display and joining, keep the real number for math, and reach for it whenever a date or amount needs to live inside a string.