HomeExcelHow to Use Excel TEXT Function: Format Numbers Like a Pro

How to Use Excel TEXT Function: Format Numbers Like a Pro

Published on

The TEXT function in Excel is a lifesaver when you need to format numbers, dates, or times in a specific way without changing the actual values. It converts a number into text with the format you specify, which is perfect for creating custom displays in reports, dashboards, or presentations. In this post let us learn how to use Excel Text function to format numbers.

What Does the TEXT Function Do?

Imagine you have a sales number like 1500.5, but you want it to display as $1,500.50 in your spreadsheet. The TEXT function handles that conversion. It takes a value and applies formatting to show it exactly how you want, all while keeping the original number intact for calculations.

The basic syntax is simple:
=TEXT(value, format_code)

  • value: The number, date, or time you want to format
  • format_code: The format pattern (we’ll cover these next)

Common Format Codes You’ll Actually Use

Here are the format codes you’ll reach for most often:

What You WantFormat Code Example
Currency with 2 decimals"$#,##0.00"=TEXT(1500, "$#,##0.00") → $1,500.00
Percentage"0.00%"=TEXT(0.85, "0.00%") → 85.00%
Phone number"[000] 000-0000"=TEXT(5551234567, "[000] 000-0000") → (555) 123-4567
Date (MM/DD/YYYY)"mm/dd/yyyy"=TEXT(TODAY(), "mm/dd/yyyy") → 07/27/2026
Time (HH:MM AM/PM)"hh:mm AM/PM"=TEXT(TIME(14,30,0), "hh:mm AM/PM") → 02:30 PM
Number with leading zeros"00000"=TEXT(42, "00000") → 00042

ALSO READ: How to Create a Custom Search Box in Excel (Step-by-Step Guide)

Real-World Examples of Using Text Function in Excel

Example 1: Formatting Sales Data

Let’s say you’re building a sales report. You have raw numbers but need them to look professional:

A1: 5250.75
B1: =TEXT(A1, "$#,##0.00")
Result: $5,250.75

Use Text function in Excel

Example 2: Making Dates Readable

You’ve got a date serial number (like 45900) and need it to display nicely in a report:

A2: 45900
B2: =TEXT(A2, "mmmm dd, yyyy")
Result: July 27, 2026

Use Text function in Excel

Or, if you want to convert a series of date formats into day, day name, month, month name and year, use the below format.

B3: =TEXT(A3:A17, {“DD” , “DDDD” , “MM” , “MMMM” , “YYYY”})

Use Text function in Excel

Why TEXT Matters (And When to Use It)

The key thing to understand: TEXT returns text, not a number. This is both a feature and a limitation.

Use TEXT when you:

  • Need formatted text for display (reports, emails, dashboards)
  • Want to combine numbers with text in a cell
  • Need to create custom labels or codes

Don’t use TEXT when you:

  • Still need to calculate with the value (formatting alone is better)
  • The original number must remain a number for math operations
  • For pure formatting without converting to text, use Excel’s built-in number formatting instead (right-click → Format Cells → Number tab).

Key Takeaway

The TEXT function transforms how numbers and dates appear without changing their underlying values. It’s essential for creating professional-looking reports and dashboards where appearance matters. Master a handful of format codes (currency, date, percentage), and you’ll handle 90% of real-world scenarios.

Ishanvi
Ishanvi
Ishanvi is a backend software engineer who mentors others to grow, combining deep technical expertise with a focus on practical, impactful solutions, continuous learning, and helping teams work smarter.

Latest articles

How to Translate in Excel with Formulas

If you're managing product catalogs, customer feedback, or reports that span multiple countries, you...

All Google Sheets Functions Not Available in Excel

Google Sheets offers powerful functions that Excel doesn't have. Whether you're a data analyst,...

Dynamic Filters in Google Sheets: Usage Guide With Example

If you've ever spent an afternoon manually re-filtering the same spreadsheet because new data...

How to Use BYROW Function in Excel Instead of SUM

Why I switched from SUM to BYROW (and why you should too)? I'll be...

More like this

How to Translate in Excel with Formulas

If you're managing product catalogs, customer feedback, or reports that span multiple countries, you...

How to Use BYROW Function in Excel Instead of SUM

Why I switched from SUM to BYROW (and why you should too)? I'll be...

How to Analyze Excel & Google Sheets Data in Minutes Using Claude AI

Manually analysing Excel and Google Sheets datasets can eat up hours of your time....

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.