Formatting inside a formula
=TEXT(value, format) turns a number or date into text using a format pattern. You need it whenever a formatted value goes into a sentence or a label. ="Due "&A2 shows the raw date number (like 46096), but ="Due "&TEXT(A2, "mmm d") shows "Due Mar 15".
| Pattern | Gives | Pattern | Gives |
|---|---|---|---|
d / dd | 5 / 05 | 0 | whole number |
ddd / dddd | Thu / Thursday | 0.00 | two decimals |
m / mm | 3 / 03 | #,##0 | thousands separators |
mmm / mmmm | Mar / March | $#,##0.00 | currency |
yy / yyyy | 26 / 2026 | 0% | percentage |
h:mm AM/PM | 2:30 PM | 00000 | pad with zeros to 5 digits |
The result is text, so it can't be summed or sorted as a number. Use TEXT for display, and keep the original value for calculations.